diff options
author | Andrew Childs <lorne@cons.org.nz> | 2020-03-04 23:24:22 +0900 |
---|---|---|
committer | Andrew Childs <lorne@cons.org.nz> | 2020-03-05 20:28:31 +0900 |
commit | ce416779bbb5d86210cbf2cc5060cc81faf53c94 (patch) | |
tree | 98ac1233a10867b9374f21eda874033f151604c7 /nixos/modules/misc | |
parent | b83164a0499475c72affebb21e7f513e7fbd0ccd (diff) |
nixos/activation: use eval-config's system argument for nesting
This avoids a possible surprise if the user is using `nixpkgs.system`
and `nesting.children`. `nesting.children` is expected to ignore all
parent configuration so we shouldn't propagate the user-facing option
`nixpkgs.system`. To avoid doing so, we introduce a new internal
option for holding the value passed to eval-config.nix, and use that
when recursing for nesting.
Diffstat (limited to 'nixos/modules/misc')
-rw-r--r-- | nixos/modules/misc/nixpkgs.nix | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/nixos/modules/misc/nixpkgs.nix b/nixos/modules/misc/nixpkgs.nix index afb74581e239..011d493c1538 100644 --- a/nixos/modules/misc/nixpkgs.nix +++ b/nixos/modules/misc/nixpkgs.nix @@ -216,6 +216,14 @@ in Ignored when <code>nixpkgs.pkgs</code> is set. ''; }; + + initialSystem = mkOption { + type = types.str; + internal = true; + description = '' + Preserved value of <literal>system</literal> passed to <literal>eval-config.nix</literal>. + ''; + }; }; config = { |