This commit is contained in:
Daniel Langbein 2024-11-21 22:45:00 +01:00
parent 62fb780bd5
commit 2343f1b5a9
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -706,6 +706,13 @@ colmena eval -E '{ nodes, lib, pkgs, ... }: pkgs.linuxPackages_latest.kernel'
#=> "/nix/store/n0csng9aw5nhpll1m5rbvvxkkj2j63px-linux-6.10.7" #=> "/nix/store/n0csng9aw5nhpll1m5rbvvxkkj2j63px-linux-6.10.7"
``` ```
Lists and strings will be printed. To inspect an attribute set, add `pkgs.lib.attrNames`.
```shell
colmena eval -E '{ nodes, lib, pkgs, ... }: pkgs.lib.attrNames nodes.yodaTux.pkgs.rust-bin.stable.latest.default'
#=> [...,"type","userHook","version"]
```
## Evaluate expressions ## Evaluate expressions
* https://discourse.nixos.org/t/eval-nix-expression-from-the-command-line/8993/6 * https://discourse.nixos.org/t/eval-nix-expression-from-the-command-line/8993/6