diff options
| author | Seth Flynn <[email protected]> | 2025-02-25 22:27:47 -0500 |
|---|---|---|
| committer | Seth Flynn <[email protected]> | 2025-02-25 22:27:47 -0500 |
| commit | c5ce8d67f80a9b4690ca9ddcb2d2e976d0f45fe5 (patch) | |
| tree | 08054a3d738aa41bdd0b60996dbc357a64b5db3f /modules/shared/defaults/nix.nix | |
| parent | 5a02460a42fba44a335858e54bd5c4cc388dfaa5 (diff) | |
modules/nix: use `registry.*.to` for flake inputs
Diffstat (limited to 'modules/shared/defaults/nix.nix')
| -rw-r--r-- | modules/shared/defaults/nix.nix | 18 |
1 files changed, 10 insertions, 8 deletions
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; }; |
