Move most extra args out of eval-config.nix
This commit is contained in:
committed by
Nicolas B. Pierron
parent
0a0a29fd0b
commit
f69ce50529
14
nixos/modules/misc/extra-arguments.nix
Normal file
14
nixos/modules/misc/extra-arguments.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
{
|
||||
__internal.args = {
|
||||
modulesPath = ../.;
|
||||
|
||||
pkgs_i686 = import ../../lib/nixpkgs.nix {
|
||||
system = "i686-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
utils = import ../../lib/utils.nix pkgs;
|
||||
};
|
||||
}
|
||||
@@ -60,6 +60,7 @@ in
|
||||
|
||||
nixpkgs.system = mkOption {
|
||||
type = types.str;
|
||||
default = builtins.currentSystem;
|
||||
description = ''
|
||||
Specifies the Nix platform type for which NixOS should be built.
|
||||
If unset, it defaults to the platform type of your host system.
|
||||
@@ -69,4 +70,12 @@ in
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = {
|
||||
__internal.args.pkgs = import ../../lib/nixpkgs.nix {
|
||||
system = config.nixpkgs.system;
|
||||
|
||||
inherit (config.nixpkgs) config;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user