Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 1e5cfc9cc88b
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 7f49fa63caf2
Choose a head ref
  • 5 commits
  • 3 files changed
  • 2 contributors

Commits on Dec 12, 2019

  1. nixos/nixos-option: fix evaluator to render a full submodule entry

    When running e.g. `nixos-option users.users.ma27`, the evaluation breaks
    since `ma27` is the attribute name in `attrsOf (submodule {})`, but not
    a part of the option tree and therefore breaks with the following
    errors:
    
    ```
    error: At 'ma27' in path 'users.users.ma27': Attribute not found
    An error occurred while looking for attribute names. Are you sure that 'users.users.ma27' exists?
    ```
    
    This happens since the option evaluator expects that either the option
    exists or the option is a submodule and the "next" token in the
    attribute path points to an option (e.g. `users.users.ma27.createHome`).
    
    This patch checks in the `Attribute not found` condition if the attribute-path
    actually exists in the config tree. If that's true, a dummy-attrset is created
    which contains `{_type = "__nixos-option-submodule-attr";}`, in that case, the
    entire entry of the submodule will be displayed.
    Ma27 committed Dec 12, 2019
    Copy the full SHA
    e0780c5 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2019

  1. 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";
      }
      ...
    chkno authored and Ma27 committed Dec 19, 2019
    Copy the full SHA
    09ac7cb View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    9dd23e8 View commit details
    Browse the repository at this point in the history
  3. nixos/nixos-option: Convert --all into -r

    chkno authored and Ma27 committed Dec 19, 2019
    Copy the full SHA
    ed51fd0 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2020

  1. Merge pull request #75439 from Ma27/submodule-fixes-for-nixos-option

    nixos/nixos-option: fix evaluator to render a full submodule entry
    Ma27 committed Feb 1, 2020
    Copy the full SHA
    7f49fa6 View commit details
    Browse the repository at this point in the history