diff options
| author | seth <[email protected]> | 2024-10-15 05:36:19 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2024-10-15 05:36:19 -0400 |
| commit | d166dc791de86695eb26613b926ccc6a55123448 (patch) | |
| tree | 21297a0865b89680643f62703b6c3d313b2da83c /modules/shared/base | |
| parent | b4ba5ffe876581adbdc158c7044319ca7ae949f5 (diff) | |
modules/nix: only enable always-allow-substitutes when it exists
Diffstat (limited to 'modules/shared/base')
| -rw-r--r-- | modules/shared/base/nix.nix | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/modules/shared/base/nix.nix b/modules/shared/base/nix.nix index 075d7be..a46d8cd 100644 --- a/modules/shared/base/nix.nix +++ b/modules/shared/base/nix.nix @@ -24,26 +24,30 @@ in nix = { package = lib.mkIf cfg.lix.enable pkgs.lix; - settings = { - always-allow-substitutes = true; - auto-optimise-store = isLinux; - experimental-features = - [ - "nix-command" - "flakes" - "auto-allocate-uids" - ] - # TODO: remove this nonsense when all implementations remove repl-flake - ++ lib.optional ( - 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 - ) "repl-flake"; - - trusted-substituters = [ "https://getchoo.cachix.org" ]; - trusted-public-keys = [ "getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE=" ]; - - nix-path = config.nix.nixPath; - }; + settings = + { + auto-optimise-store = isLinux; + experimental-features = + [ + "nix-command" + "flakes" + "auto-allocate-uids" + ] + # TODO: remove this nonsense when all implementations remove repl-flake + ++ lib.optional ( + 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 + ) "repl-flake"; + + trusted-substituters = [ "https://getchoo.cachix.org" ]; + trusted-public-keys = [ "getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE=" ]; + + nix-path = config.nix.nixPath; + } + // lib.mkIf (lib.versionAtLeast config.nix.package.version "2.19.0") { + always-allow-substitutes = true; + + }; gc = { automatic = lib.mkDefault true; |
