From c5ce8d67f80a9b4690ca9ddcb2d2e976d0f45fe5 Mon Sep 17 00:00:00 2001 From: Seth Flynn Date: Tue, 25 Feb 2025 22:27:47 -0500 Subject: modules/nix: use `registry.*.to` for flake inputs --- modules/shared/defaults/nix.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'modules/shared/defaults') diff --git a/modules/shared/defaults/nix.nix b/modules/shared/defaults/nix.nix index 9bc2638..9c59f10 100644 --- a/modules/shared/defaults/nix.nix +++ b/modules/shared/defaults/nix.nix @@ -11,7 +11,10 @@ let # TODO: remove this nonsense when all implementations remove repl-flake hasReplFlake = lib.versionOlder config.nix.package.version "2.22.0" # repl-flake was removed in nix 2.22.0 - || lib.versionAtLeast config.nix.package.version "2.90.0"; # but not in lix yet + || ( + lib.versionAtLeast config.nix.package.version "2.90.0" + && lib.versionOlder config.nix.package.version "2.91.0" + ); # but not until lix 2.91 hasAlwaysAllowSubstitutes = lib.versionAtLeast config.nix.package.version "2.19.0"; in @@ -43,14 +46,13 @@ in options = lib.mkDefault "--delete-older-than 5d"; }; - registry = lib.mapAttrs (lib.const ( - flake: - lib.mkForce { - inherit flake; - } - )) inputs; + registry = lib.mapAttrs (lib.const (flake: { + to = lib.mkDefault { + type = "path"; + path = flake.outPath; + }; + })) inputs; - # See comment below nixPath = lib.mapAttrsToList (name: lib.const "${name}=flake:${name}") inputs; }; -- cgit v1.2.3