diff options
| -rw-r--r-- | modules/nixos/defaults/nix.nix | 14 | ||||
| -rw-r--r-- | modules/shared/defaults/nix.nix | 12 |
2 files changed, 6 insertions, 20 deletions
diff --git a/modules/nixos/defaults/nix.nix b/modules/nixos/defaults/nix.nix index 064b0d9..e55faf4 100644 --- a/modules/nixos/defaults/nix.nix +++ b/modules/nixos/defaults/nix.nix @@ -1,4 +1,4 @@ -{ lib, inputs, ... }: +{ lib, ... }: { nix = { channel.enable = lib.mkDefault false; @@ -9,16 +9,4 @@ }; nixpkgs.config.allowAliases = false; - - # Link inputs for use in `$NIX_PATH` - systemd.tmpfiles.settings = { - nix-inputs = lib.mapAttrs' ( - name: input: - lib.nameValuePair "/etc/nix/inputs/${name}" { - L = { - argument = input.outPath; - }; - } - ) inputs; - }; } diff --git a/modules/shared/defaults/nix.nix b/modules/shared/defaults/nix.nix index 8ecdfe1..c4cc2c3 100644 --- a/modules/shared/defaults/nix.nix +++ b/modules/shared/defaults/nix.nix @@ -14,10 +14,6 @@ let || lib.versionAtLeast config.nix.package.version "2.90.0"; # but not in lix yet hasAlwaysAllowSubstitutes = lib.versionAtLeast config.nix.package.version "2.19.0"; - - # Use systemd-tmpfiles on Linux - nixPathFromInput = - name: input: "${name}=${if isLinux then "/etc/nix/inputs/${name}" else input.outPath}"; in { config = lib.mkMerge [ @@ -37,14 +33,16 @@ in options = lib.mkDefault "--delete-older-than 2d"; }; + registry = lib.mapAttrs (lib.const (flake: { + inherit flake; + })) inputs; + # See comment below - nixPath = lib.mapAttrsToList nixPathFromInput inputs; + nixPath = lib.mapAttrsToList (name: lib.const "${name}=flake:${name}") inputs; }; nixpkgs = { config.allowUnfree = lib.mkDefault true; - # The `flake:` syntax in `$NIX_PATH` seems to do some weird copying on Nix 2.24 - flake.setNixPath = false; }; } |
