Allow nixpkgs to be configured via nixpkgs.config (#164)
This commit is contained in:
parent
19f20fe6e4
commit
cb01c5c4dd
2 changed files with 7 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ let
|
|||
{
|
||||
_file = "${self.printAttrPos (builtins.unsafeGetAttrPos "a" { a = null; })}: inline module";
|
||||
_module.args = {
|
||||
pkgs = import nixpkgs { system = config.nixpkgs.hostPlatform; };
|
||||
pkgs = import nixpkgs { system = config.nixpkgs.hostPlatform; inherit (config.nixpkgs) config; };
|
||||
utils = import "${nixos}/lib/utils.nix" {
|
||||
inherit lib config pkgs;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,6 +27,12 @@
|
|||
default = throw "the option nixpkgs.hostPlatform needs to be set.";
|
||||
};
|
||||
|
||||
config = lib.mkOption {
|
||||
type = types.attrs;
|
||||
description = ''Configuration used to instantiate nixpkgs.'';
|
||||
default = {};
|
||||
};
|
||||
|
||||
pkgs = lib.mkOption {
|
||||
type = lib.types.pkgs;
|
||||
description = ''The pkgs module argument.'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue