From 2343f1b5a93d4cc8db743a4aa1a175c66acfdd53 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Thu, 21 Nov 2024 22:45:00 +0100 Subject: [PATCH] docs --- NixOS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/NixOS.md b/NixOS.md index 560678c..536dcd3 100644 --- a/NixOS.md +++ b/NixOS.md @@ -706,6 +706,13 @@ colmena eval -E '{ nodes, lib, pkgs, ... }: pkgs.linuxPackages_latest.kernel' #=> "/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 * https://discourse.nixos.org/t/eval-nix-expression-from-the-command-line/8993/6