nixpkgs-suyu/nixos/modules/installer/tools
Chuck 09ac7cb55f nixos/nixos-option: Show values inside aggregate options uniformly
1. This makes aggregates of submodules (including the very important
"nixos-option users.users.<username>" case) behave the same way as any
other you-need-to-keep-typing-to-get-to-an-option-leaf (eg:
"nixos-option environment").

Before e0780c5:

  $ nixos-option users.users.root
  error: At 'root' in path 'users.users.root': Attribute not found
  An error occurred while looking for attribute names. Are you sure that 'users.users.root' exists?

After e0780c5 but before this change, this query just printed out a raw
thing, which is behavior that belongs in "nix eval", "nix-instantiate
--eval", or "nix repl <<<":

  $ nixos-option users.users.root
  {
    _module = {
      args = { name = "root"; };
      check = true;
    };
    createHome = false;
    cryptHomeLuks = null;
    description = "System administrator";
    ...

After this change:

  $ nixos-option users.users.root
  This attribute set contains:
  createHome
  cryptHomeLuks
  description
  extraGroups
  group
  hashedPassword
  ...

2. For aggregates of other types (not submodules), print out the option
that contains them rather than printing an error message.

Before:

  $ nixos-option environment.shellAliases.l
  error: At 'l' in path 'environment.shellAliases.l': Attribute not found
  An error occurred while looking for attribute names. Are you sure that 'environment.shellAliases.l' exists?

After:

  $ nixos-option environment.shellAliases.l
  Note: showing environment.shellAliases instead of environment.shellAliases.l
  Value:
  {
    l = "ls -alh";
    ll = "ls -l";
    ls = "ls --color=tty";
  }
  ...
2019-12-19 15:00:43 +01:00
..
nixos-build-vms
nixos-option nixos/nixos-option: Show values inside aggregate options uniformly 2019-12-19 15:00:43 +01:00
get-version-suffix
nix-fallback-paths.nix nix: 2.3 -> 2.3.1 2019-10-10 16:23:33 +02:00
nixos-enter.sh nixos-enter: silent activation script option 2019-08-13 23:48:58 +02:00
nixos-generate-config.pl nixos-generate-config: add useDHCP per interface 2019-09-24 11:44:01 +02:00
nixos-install.sh Revert "Merge #67232: machinectl compliant NixOS installation" 2019-10-07 20:56:59 +02:00
nixos-rebuild.sh nixos-rebuild: add explicit option to enable (remote) sudo 2019-11-07 17:03:12 +01:00
nixos-version.sh
tools.nix nixos/nixos-option: Rewrite in a more suitable language 2019-11-04 15:11:44 +01:00