diff options
| author | seth <[email protected]> | 2024-02-03 20:06:30 -0500 |
|---|---|---|
| committer | seth <[email protected]> | 2024-02-03 20:47:55 -0500 |
| commit | 9d37a9a065c021ec5951b9d1b5c97a4b165182b1 (patch) | |
| tree | 22cd40771256f6c3512897a4582ea6cb70b91129 /modules/flake | |
| parent | 1ac587856745cddb0f9be4441da57568bb8825b8 (diff) | |
flakeModules/configurations: add inputs' as a special arg
Diffstat (limited to 'modules/flake')
| -rw-r--r-- | modules/flake/configurations.nix | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/flake/configurations.nix b/modules/flake/configurations.nix index 04bcf5a..7980b8a 100644 --- a/modules/flake/configurations.nix +++ b/modules/flake/configurations.nix @@ -1,6 +1,7 @@ { config, lib, + withSystem, inputs, ... }: let @@ -36,6 +37,8 @@ } .${type}; + inputsFor = system: withSystem system ({inputs', ...}: inputs'); + mkSystem = type: name: let args = cfg.${type}.systems.${name}; in @@ -50,6 +53,7 @@ specialArgs = { inherit inputs; + inputs' = inputsFor args.system; secretsDir = ../../secrets/${name}; }; }); @@ -72,7 +76,10 @@ ++ cfg.home.modules ++ args.modules; - extraSpecialArgs = {inherit inputs;}; + extraSpecialArgs = { + inherit inputs; + inputs' = inputsFor args.pkgs.stdenv.hostPlatform.system; + }; }); mapSystems = type: mapAttrs (name: _: mkSystem type name) cfg.${type}.systems; |
