summaryrefslogtreecommitdiff
path: root/modules/nixos/base/nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos/base/nix.nix')
-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}");
};
}