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 {
|
lib = import ./nix/lib.nix {
|
||||||
inherit nixpkgs self;
|
inherit nixpkgs self;
|
||||||
nixosModules = "${nixpkgs}/nixos";
|
nixos = "${nixpkgs}/nixos";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ nixpkgs # The nixpkgs flake
|
{ nixpkgs # The nixpkgs flake
|
||||||
, self # The system-manager 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
|
let
|
||||||
|
|
@ -20,13 +20,14 @@ in
|
||||||
extraArgsModule = { lib, config, pkgs, ... }: {
|
extraArgsModule = { lib, config, pkgs, ... }: {
|
||||||
_module.args = {
|
_module.args = {
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
utils = import "${nixosModules}/lib/utils.nix" {
|
utils = import "${nixos}/lib/utils.nix" {
|
||||||
inherit lib config pkgs;
|
inherit lib config pkgs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = (lib.evalModules {
|
config = (lib.evalModules {
|
||||||
|
specialArgs = { nixosModulesPath = "${nixos}/modules"; } // extraSpecialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
extraArgsModule
|
extraArgsModule
|
||||||
./modules
|
./modules
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue