1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-23 16:11:51 +03:00
This commit is contained in:
nrdxp 2021-02-17 19:56:50 +00:00
parent e4df94efcd
commit bc25535d3d
5 changed files with 48 additions and 11 deletions

8
overlays/nixFlakes.nix Normal file
View File

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

View File

@ -0,0 +1,28 @@
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

@ -138,10 +138,10 @@ in
trustedUsers = [ "root" "@wheel" ];
extraOptions = ''
experimental-features = nix-command flakes ca-references
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
};

View File

@ -22,7 +22,7 @@ pkgs.devshell.mkShell
nixos-install
nixos-generate-config
nixos-enter
] ++ lib.optional (system == "x86_64-linux") pkgs.deploy-rs;
];
git.hooks = {
pre-commit.text = lib.fileContents ./pre-commit.sh;
@ -32,13 +32,11 @@ pkgs.devshell.mkShell
{
package = flk;
}
{
name = "nix";
help = nixFlakes.meta.description;
command = ''
${nixFlakes}/bin/nix --option experimental-features \
"nix-command flakes ca-references" "$@"
'';
}
] ++ lib.optional (system != "i686-linux") { package = cachix; };
]
++ lib.optional (system != "i686-linux") { package = cachix; }
++ lib.optional (system == "x86_64-linux") {
name = "deploy";
package = deploy-rs;
help = "A simple multi-profile Nix-flake deploy tool.";
};
}

View File

@ -25,5 +25,8 @@ category = "documentation"
package = "mdbook"
category = "documentation"
[[commands]]
package = "nixFlakes"
[git.hooks]
enable = true