[Nix] use bleeding edge Nix version + conditional repl-flake

Included with "flakes" if Nix version is >= 2.19
This commit is contained in:
Antoine Viallon 2024-05-23 10:51:47 +02:00
parent 67038259e8
commit 6e94b4ae77
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -85,7 +85,7 @@ in
};
nix.package = optimizePkg { lto = true; level = "slower"; } pkgs.nix;
nix.package = optimizePkg { lto = true; level = "slower"; } pkgs.nixVersions.latest;
nix.settings.system-features = [ "big-parallel" "kvm" "benchmark" ]
++ optional ( ! isNull generalCfg.cpu.arch ) "gccarch-${generalCfg.cpu.arch}"
@ -96,7 +96,8 @@ in
nix.settings.builders-use-substitutes = true;
nix.settings.substitute = true;
nix.settings.experimental-features = [ "nix-command" "flakes" "repl-flake" ]
nix.settings.experimental-features = [ "nix-command" "flakes" ]
++ optional (versionOlder config.nix.package.version "2.19") "repl-flake"
++ optional cfg.contentAddressed "ca-derivations";
nix.settings.download-attempts = 5;