Add the nixosModules special arg.
This commit is contained in:
parent
94119b4ae6
commit
40597a9540
2 changed files with 6 additions and 5 deletions
|
|
@ -52,7 +52,7 @@
|
|||
{
|
||||
lib = import ./nix/lib.nix {
|
||||
inherit nixpkgs self;
|
||||
nixosModules = "${nixpkgs}/nixos";
|
||||
nixos = "${nixpkgs}/nixos";
|
||||
};
|
||||
}
|
||||
//
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ nixpkgs # The nixpkgs flake
|
||||
, self # The system-manager flake
|
||||
, nixosModules # The path to the nixos modules dir from nixpkgs
|
||||
, nixos # The path to the nixos dir from nixpkgs
|
||||
,
|
||||
}:
|
||||
let
|
||||
|
|
@ -20,13 +20,14 @@ in
|
|||
extraArgsModule = { lib, config, pkgs, ... }: {
|
||||
_module.args = {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
utils = import "${nixosModules}/lib/utils.nix" {
|
||||
utils = import "${nixos}/lib/utils.nix" {
|
||||
inherit lib config pkgs;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = (lib.evalModules {
|
||||
specialArgs = { nixosModulesPath = "${nixos}/modules"; } // extraSpecialArgs;
|
||||
modules = [
|
||||
extraArgsModule
|
||||
./modules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue