mkSystem: pass used flake as module arg "nixpkgs"
This commit is contained in:
parent
edd58a9a30
commit
baa973b5c7
@ -87,8 +87,9 @@
|
|||||||
# This function produces a module that adds the home-manager module to the
|
# This function produces a module that adds the home-manager module to the
|
||||||
# system and configures the given module to the user's Home Manager
|
# system and configures the given module to the user's Home Manager
|
||||||
# configuration
|
# configuration
|
||||||
homeManagerInit = let _username=username;
|
homeManagerInit = let _username=username; _nixpkgs=nixpkgs;
|
||||||
in { system,
|
in { system,
|
||||||
|
nixpkgs ? _nixpkgs, # this is so modules can know which flake the system is using
|
||||||
home-manager ? inputs.home-manager,
|
home-manager ? inputs.home-manager,
|
||||||
username ? _username,
|
username ? _username,
|
||||||
module ? _ : {},
|
module ? _ : {},
|
||||||
@ -118,7 +119,7 @@
|
|||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
inherit users;
|
inherit users;
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = {
|
||||||
inherit inputs outputs vars;
|
inherit inputs outputs vars nixpkgs;
|
||||||
extraPkgs = mkExtraPkgs system;
|
extraPkgs = mkExtraPkgs system;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -156,13 +157,13 @@
|
|||||||
})
|
})
|
||||||
./hosts/${hostname}/configuration.nix
|
./hosts/${hostname}/configuration.nix
|
||||||
(homeManagerInit {
|
(homeManagerInit {
|
||||||
inherit home-manager;
|
inherit nixpkgs home-manager;
|
||||||
module = import ./hosts/${hostname}/home.nix;
|
module = import ./hosts/${hostname}/home.nix;
|
||||||
inherit username system stateVersion;
|
inherit username system stateVersion;
|
||||||
})
|
})
|
||||||
] ++ extraModules;
|
] ++ extraModules;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs outputs vars;
|
inherit inputs outputs vars nixpkgs;
|
||||||
extraPkgs = mkExtraPkgs system;
|
extraPkgs = mkExtraPkgs system;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user