nixpkgs/nixos
Maximilian Bosch e0780c5cff
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.
2019-12-12 14:27:36 +01:00
..
doc Merge pull request #73968 from mat8913/upower-config-master 2019-12-05 05:25:00 +00:00
lib nixos/test: Use retry() in all looping functions that need timeouts 2019-12-03 16:59:43 +01:00
maintainers ec2/create-amis.sh: register root device as /dev/xvda 2019-11-02 05:58:58 +09:00
modules nixos/nixos-option: fix evaluator to render a full submodule entry 2019-12-12 14:27:36 +01:00
tests Merge pull request #75180 from flokli/nixos-test-port-pam-u2f 2019-12-07 23:57:14 +01:00
COPYING
default.nix
README
release-combined.nix nixos/containers-ip: Test both ipv4 and ipv6 in the same script 2019-11-27 09:13:02 +01:00
release-small.nix nixos/containers-ip: Test both ipv4 and ipv6 in the same script 2019-11-27 09:13:02 +01:00
release.nix Merge pull request #68265 from tkerber/rpi4 2019-09-27 14:35:17 -04:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.