nixos: make extendModules retain pkgs on nixos configs

This commit is contained in:
r-vdp 2023-07-28 18:10:41 +02:00
parent 074e1daf50
commit 5054472759
No known key found for this signature in database

View File

@ -109,8 +109,10 @@ let
nixosWithUserModules = noUserModules.extendModules { modules = allUserModules; };
withExtraArgs = nixosSystem: nixosSystem // {
inherit extraArgs;
inherit (nixosSystem._module.args) pkgs;
extendModules = args: withExtraArgs (nixosSystem.extendModules args);
};
in
withWarnings nixosWithUserModules // {
inherit extraArgs;
inherit (nixosWithUserModules._module.args) pkgs;
}
withWarnings (withExtraArgs nixosWithUserModules)