nixos/eval-config: Allow system to be set modularly when arg is null
This commit is contained in:
@@ -9,7 +9,9 @@
|
|||||||
# expressions are ever made modular at the top level) can just use
|
# expressions are ever made modular at the top level) can just use
|
||||||
# types.submodule instead of using eval-config.nix
|
# types.submodule instead of using eval-config.nix
|
||||||
evalConfigArgs@
|
evalConfigArgs@
|
||||||
{ # !!! system can be set modularly, would be nice to remove
|
{ # !!! system can be set modularly, would be nice to remove,
|
||||||
|
# however, removing or changing this default is too much
|
||||||
|
# of a breaking change. To set it modularly, pass `null`.
|
||||||
system ? builtins.currentSystem
|
system ? builtins.currentSystem
|
||||||
, # !!! is this argument needed any more? The pkgs argument can
|
, # !!! is this argument needed any more? The pkgs argument can
|
||||||
# be set modularly anyway.
|
# be set modularly anyway.
|
||||||
@@ -48,7 +50,7 @@ let
|
|||||||
# this. Since the latter defaults to the former, the former should
|
# this. Since the latter defaults to the former, the former should
|
||||||
# default to the argument. That way this new default could propagate all
|
# default to the argument. That way this new default could propagate all
|
||||||
# they way through, but has the last priority behind everything else.
|
# they way through, but has the last priority behind everything else.
|
||||||
nixpkgs.system = lib.mkDefault system;
|
nixpkgs.system = lib.mkIf (system != null) (lib.mkDefault system);
|
||||||
|
|
||||||
_module.args.pkgs = lib.mkIf (pkgs_ != null) (lib.mkForce pkgs_);
|
_module.args.pkgs = lib.mkIf (pkgs_ != null) (lib.mkForce pkgs_);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user