diff options
author | Minijackson <minijackson@riseup.net> | 2023-04-10 15:02:15 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2023-04-10 15:02:15 +0200 |
commit | b354e48d48d18ac6c50791c27bd088d4ae0c3e45 (patch) | |
tree | 8dd26bed483fa11f85322e4e883d24908f81b55d /common/nix.nix | |
parent | 520ac2b328b227625685082464ccab0e2564726e (diff) | |
download | nixos-config-reborn-b354e48d48d18ac6c50791c27bd088d4ae0c3e45.tar.gz nixos-config-reborn-b354e48d48d18ac6c50791c27bd088d4ae0c3e45.zip |
nix: set NIX_PATH in the same way as the nix registry
Diffstat (limited to 'common/nix.nix')
-rw-r--r-- | common/nix.nix | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/common/nix.nix b/common/nix.nix index e31bcbf..0e58908 100644 --- a/common/nix.nix +++ b/common/nix.nix | |||
@@ -1,8 +1,8 @@ | |||
1 | inputs: | 1 | inputs: { |
2 | 2 | config, | |
3 | { pkgs, ... }: | 3 | lib, |
4 | 4 | ... | |
5 | { | 5 | }: { |
6 | nix = { | 6 | nix = { |
7 | gc = { | 7 | gc = { |
8 | automatic = true; | 8 | automatic = true; |
@@ -14,5 +14,13 @@ inputs: | |||
14 | auto-optimise-store = true; | 14 | auto-optimise-store = true; |
15 | extra-experimental-features = ["nix-command" "flakes"]; | 15 | extra-experimental-features = ["nix-command" "flakes"]; |
16 | }; | 16 | }; |
17 | |||
18 | registry = lib.mapAttrs (_name: value: {flake = value;}) inputs; | ||
19 | nixPath = | ||
20 | lib.mapAttrsToList | ||
21 | (name: value: "${name}=${value.flake}") | ||
22 | (lib.filterAttrs | ||
23 | (name: value: name != "self" && value.flake != null) | ||
24 | config.nix.registry); | ||
17 | }; | 25 | }; |
18 | } | 26 | } |