fix: use specialArgs instead of _module.args

Avoids infinite recursion issues in some cases.
This commit is contained in:
Felix Schröter 2023-07-12 20:50:01 +02:00
parent afdcbb0c06
commit 09f7db14c3
Signed by: felschr
GPG key ID: 671E39E6744C807D
3 changed files with 45 additions and 10 deletions

View file

@ -100,14 +100,7 @@
nixpkgs.overlays = systemDefaults.overlays;
imports = systemDefaults.modules ++ [
hardwareConfig
config
{
# make arguments available to modules
_module.args = { inherit self inputs; };
}
];
imports = systemDefaults.modules ++ [ hardwareConfig config ];
environment.systemPackages = with pkgs;
[ agenix.packages.x86_64-linux.default ];
@ -118,6 +111,7 @@
(createUser' name args) ({ inherit home-manager; } // args2));
createMediaGroup = _: { users.groups.media.gid = 600; };
};
specialArgs = { inherit inputs; };
in rec {
inherit lib overlays nixosModules homeManagerModules;
@ -145,6 +139,7 @@
[ deploy-rs.defaultPackage.x86_64-linux ];
})
];
inherit specialArgs;
};
nixosConfigurations.pilot1 = nixpkgs.lib.nixosSystem {
@ -164,6 +159,7 @@
config = ./home/felschr-work.nix;
})
];
inherit specialArgs;
};
nixosConfigurations.home-server = nixpkgs.lib.nixosSystem {
@ -189,6 +185,7 @@
config = ./home/felschr-server.nix;
})
];
inherit specialArgs;
};
deploy.nodes.home-server = {