summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorseth <[email protected]>2023-08-13 15:18:07 -0400
committerseth <[email protected]>2023-08-13 15:18:07 -0400
commit92f04aaeebdeea77adf1687328720d3583fa91f3 (patch)
tree26f955d4c901b835fb76f07f88f380d8a0dbf4b3 /modules
parent547b88bfdd93a700636a1497878f2a082f95e765 (diff)
modules/nix+hosts: use all inputs across channels and registry
Diffstat (limited to 'modules')
-rw-r--r--modules/nixos/base/nix.nix14
1 files changed, 6 insertions, 8 deletions
diff --git a/modules/nixos/base/nix.nix b/modules/nixos/base/nix.nix
index 3f2bcd3..947f086 100644
--- a/modules/nixos/base/nix.nix
+++ b/modules/nixos/base/nix.nix
@@ -1,7 +1,7 @@
{
config,
lib,
- pkgs,
+ inputs,
...
}: let
cfg = config.getchoo.base.nix-settings;
@@ -15,7 +15,8 @@ in {
];
config = let
- channelPath = "/etc/nix/channels/nixpkgs";
+ channelPath = i: "/etc/nix/channels/${i}";
+ mapInputs = fn: builtins.map fn (builtins.attrNames inputs);
in
mkIf cfg.enable {
nix = {
@@ -30,13 +31,10 @@ in {
experimental-features = ["nix-command" "flakes" "auto-allocate-uids" "repl-flake"];
};
- nixPath = [
- "nixpkgs=${channelPath}"
- ];
+ nixPath = mapInputs (i: "${i}=${channelPath i}");
};
- systemd.tmpfiles.rules = [
- "L+ ${channelPath} - - - - ${pkgs.path}"
- ];
+ systemd.tmpfiles.rules =
+ mapInputs (i: "L+ ${channelPath i} - - - - ${inputs.${i}.outPath}");
};
}