From 20c0549706709fbacb390b0ba9975acc49ac21fc Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Thu, 13 Jun 2024 13:45:32 +0800 Subject: [PATCH] modules: update shared Nix config profile --- modules/home-manager/profiles/nix-conf.nix | 7 ++++--- modules/nixos/profiles/nix-conf.nix | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/home-manager/profiles/nix-conf.nix b/modules/home-manager/profiles/nix-conf.nix index c4751fb0..e0d4b339 100644 --- a/modules/home-manager/profiles/nix-conf.nix +++ b/modules/home-manager/profiles/nix-conf.nix @@ -1,5 +1,4 @@ -{ lib, pkgs, ... }: { - +{ config, lib, pkgs, ... }: { # Set the package for generating the configuration. nix.package = lib.mkDefault pkgs.nixStable; @@ -21,7 +20,9 @@ # # Since we're using flakes to make this possible, we need it. Plus, the # UX of Nix CLI is becoming closer to Guix's which is a nice bonus. - experimental-features = [ "nix-command" "flakes" "repl-flake" ]; + experimental-features = + [ "nix-command" "flakes" ] + ++ lib.optionals (lib.versionOlder config.nix.package.version "2.22.0") [ "repl-flake" ]; auto-optimise-store = lib.mkDefault true; flake-registry = ""; }; diff --git a/modules/nixos/profiles/nix-conf.nix b/modules/nixos/profiles/nix-conf.nix index c4751fb0..e0d4b339 100644 --- a/modules/nixos/profiles/nix-conf.nix +++ b/modules/nixos/profiles/nix-conf.nix @@ -1,5 +1,4 @@ -{ lib, pkgs, ... }: { - +{ config, lib, pkgs, ... }: { # Set the package for generating the configuration. nix.package = lib.mkDefault pkgs.nixStable; @@ -21,7 +20,9 @@ # # Since we're using flakes to make this possible, we need it. Plus, the # UX of Nix CLI is becoming closer to Guix's which is a nice bonus. - experimental-features = [ "nix-command" "flakes" "repl-flake" ]; + experimental-features = + [ "nix-command" "flakes" ] + ++ lib.optionals (lib.versionOlder config.nix.package.version "2.22.0") [ "repl-flake" ]; auto-optimise-store = lib.mkDefault true; flake-registry = ""; };