nixpkgs/nixos/modules/installer
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
..
cd-dvd nixos/plasma5: drop enableQt4Support option 2019-11-22 09:01:05 +01:00
netboot treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
scan [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
tools nixos/nixos-option: Show values inside aggregate options uniformly 2019-12-19 15:00:43 +01:00
virtualbox-demo.nix ova: remove stateVersion 2019-03-09 14:25:05 -05:00