summaryrefslogtreecommitdiff
path: root/modules/shared/base/nix.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-06-30 11:18:03 -0400
committerseth <[email protected]>2024-06-30 11:23:48 -0400
commit5c3fa2a0412528cd53dbbc466468bda1be907343 (patch)
tree514968552b3aa37731ffbbbccde40fb3aa6ad26a /modules/shared/base/nix.nix
parent02b8e754e66981ffc11ffc130a7effda7ee97f79 (diff)
modules/nix: only enable `repl-flake` on nix < 2.22.0
Diffstat (limited to 'modules/shared/base/nix.nix')
-rw-r--r--modules/shared/base/nix.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/modules/shared/base/nix.nix b/modules/shared/base/nix.nix
index 5d70f46..f54076e 100644
--- a/modules/shared/base/nix.nix
+++ b/modules/shared/base/nix.nix
@@ -24,12 +24,15 @@ in
settings = {
auto-optimise-store = pkgs.stdenv.isLinux;
- experimental-features = [
- "nix-command"
- "flakes"
- "auto-allocate-uids"
- "repl-flake"
- ];
+ experimental-features =
+ [
+ "nix-command"
+ "flakes"
+ "auto-allocate-uids"
+ ]
+ # TODO: remove when nix >= 2.22.0 is the default in nixpkgs
+ # repl-flake was removed in nix 2.22.0
+ ++ lib.optional (lib.versionOlder config.nix.package.version "2.22.0") "repl-flake";
trusted-substituters = [ "https://getchoo.cachix.org" ];
trusted-public-keys = [ "getchoo.cachix.org-1:ftdbAUJVNaFonM0obRGgR5+nUmdLMM+AOvDOSx0z5tE=" ];