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 | |
| parent | 1ac587856745cddb0f9be4441da57568bb8825b8 (diff) | |
flakeModules/configurations: add inputs' as a special arg
| -rw-r--r-- | modules/flake/configurations.nix | 9 | ||||
| -rw-r--r-- | modules/shared/users/default.nix | 8 | ||||
| -rw-r--r-- | users/seth/module/programs/firefox/default.nix | 7 | ||||
| -rw-r--r-- | users/seth/module/programs/neovim.nix | 5 |
4 files changed, 18 insertions, 11 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; 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';}; }; } diff --git a/users/seth/module/programs/firefox/default.nix b/users/seth/module/programs/firefox/default.nix index fed31c5..ac67a31 100644 --- a/users/seth/module/programs/firefox/default.nix +++ b/users/seth/module/programs/firefox/default.nix @@ -1,13 +1,10 @@ { config, lib, - inputs, - pkgs, + inputs', ... }: let cfg = config.seth.programs.firefox; - - inherit (pkgs.stdenv.hostPlatform) system; in { options.seth.programs.firefox = { enable = @@ -29,7 +26,7 @@ in { programs.firefox = { enable = true; profiles.arkenfox = { - extensions = with inputs.firefox-addons.packages.${system}; [ + extensions = with inputs'.firefox-addons.packages; [ bitwarden floccus ublock-origin diff --git a/users/seth/module/programs/neovim.nix b/users/seth/module/programs/neovim.nix index 6220853..8230c8d 100644 --- a/users/seth/module/programs/neovim.nix +++ b/users/seth/module/programs/neovim.nix @@ -2,11 +2,10 @@ config, lib, pkgs, - inputs, + inputs', ... }: let cfg = config.seth.programs.neovim; - inherit (pkgs.stdenv.hostPlatform) system; in { options.seth.programs.neovim = { enable = lib.mkEnableOption "Neovim configuration" // {default = true;}; @@ -15,7 +14,7 @@ in { config = lib.mkIf cfg.enable { home.packages = [ (let - getchvim = inputs.getchvim.packages.${system}.default; + getchvim = inputs'.getchvim.packages.default; in # remove desktop file pkgs.symlinkJoin { |
