nix: remove patch for default unstable features

This commit is contained in:
Timothy DeHerrera 2021-03-16 22:11:56 -06:00
parent 436fbb08e8
commit 9ba1e7f9bc
No known key found for this signature in database
GPG Key ID: 8985725DB5B0C122
4 changed files with 19 additions and 42 deletions

View File

@ -13,6 +13,13 @@ let
suites = import ../suites { inherit lib; }; suites = import ../suites { inherit lib; };
experimentalFeatures = [
"flakes"
"nix-command"
"ca-references"
"ca-derivations"
];
modules = { modules = {
core = ../profiles/core; core = ../profiles/core;
modOverrides = { config, overrideModulesPath, ... }: modOverrides = { config, overrideModulesPath, ... }:
@ -47,6 +54,12 @@ let
override.flake = override; override.flake = override;
}; };
nix.extraOptions = ''
experimental-features = ${lib.concatStringsSep " "
experimentalFeatures
}
'';
system.configurationRevision = lib.mkIf (self ? rev) self.rev; system.configurationRevision = lib.mkIf (self ? rev) self.rev;
}; };

View File

@ -1,12 +0,0 @@
final: prev: {
nixFlakes = final.nix.overrideAttrs
(self:
let
oldPatches = self.patches or [ ];
in
{
patches = oldPatches ++ [
../pkgs/tools/package-management/nix/0001-nix-command-and-flakes-by-default.patch
];
});
}

View File

@ -1,28 +0,0 @@
From a47bbae869ff35095eb2fe4d4d5145054ea81049 Mon Sep 17 00:00:00 2001
From: Timothy DeHerrera <tim.deh@pm.me>
Date: Wed, 17 Feb 2021 12:26:48 -0700
Subject: [PATCH] nix-command and flakes by default
---
src/libstore/globals.hh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index eabd83e3f..e851e2a79 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -889,7 +889,10 @@ public:
value.
)"};
- Setting<Strings> experimentalFeatures{this, {}, "experimental-features",
+ Setting<Strings> experimentalFeatures{
+ this,
+ {"nix-command", "flakes", "ca-references"},
+ "experimental-features",
"Experimental Nix features to enable."};
bool isExperimentalFeatureEnabled(const std::string & name);
--
2.28.0

View File

@ -22,7 +22,6 @@ pkgs.devshell.mkShell
nixos-install nixos-install
nixos-generate-config nixos-generate-config
nixos-enter nixos-enter
pkgs.nixFlakes
]; ];
git.hooks = { git.hooks = {
@ -30,8 +29,13 @@ pkgs.devshell.mkShell
}; };
commands = with pkgs; [ commands = with pkgs; [
{ package = flk; }
{ {
package = flk; name = "nix";
help = pkgs.nixFlakes.meta.description;
command = ''
${pkgs.nixFlakes}/bin/nix --experimental-features "nix-command flakes ca-references" "${"\${@}"}"
'';
} }
] ]
++ lib.optional (system != "i686-linux") { package = cachix; } ++ lib.optional (system != "i686-linux") { package = cachix; }