From 9d37a9a065c021ec5951b9d1b5c97a4b165182b1 Mon Sep 17 00:00:00 2001 From: seth Date: Sat, 3 Feb 2024 20:06:30 -0500 Subject: flakeModules/configurations: add inputs' as a special arg --- modules/flake/configurations.nix | 9 ++++++++- modules/shared/users/default.nix | 8 ++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'modules') 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; diff --git a/modules/shared/users/default.nix b/modules/shared/users/default.nix index 6e1a3f6..bb3062e 100644 --- a/modules/shared/users/default.nix +++ b/modules/shared/users/default.nix @@ -1,4 +1,8 @@ -{inputs, ...}: { +{ + inputs, + inputs', + ... +}: { imports = [ ./seth.nix ]; @@ -6,6 +10,6 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = {inherit inputs;}; + extraSpecialArgs = {inherit inputs inputs';}; }; } -- cgit v1.2.3