aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/common/core/nix.nix
diff options
context:
space:
mode:
authorMark Nipper <nipsy@bitgnome.net>2024-03-31 02:40:11 -0700
committerMark Nipper <nipsy@bitgnome.net>2024-03-31 02:40:11 -0700
commit76b3b07e7329be637b37f92e767595143d3b03fa (patch)
treeff674a9bc8d8e1cdba94cb0d1c13de28b75c1e74 /hosts/common/core/nix.nix
parent04fd53819ffce3e1275ec48bcdf71769414fdea1 (diff)
downloadnix-76b3b07e7329be637b37f92e767595143d3b03fa.tar
nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.gz
nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.bz2
nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.lz
nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.xz
nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.zst
nix-76b3b07e7329be637b37f92e767595143d3b03fa.zip
Migrate to more modular layout
Diffstat (limited to 'hosts/common/core/nix.nix')
-rw-r--r--hosts/common/core/nix.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/hosts/common/core/nix.nix b/hosts/common/core/nix.nix
new file mode 100644
index 0000000..587bac6
--- /dev/null
+++ b/hosts/common/core/nix.nix
@@ -0,0 +1,30 @@
+{ inputs, lib, ... }:
+{
+ nix = {
+ settings = {
+ trusted-users = [ "root" "@wheel" ];
+
+ auto-optimise-store = lib.mkDefault true;
+ experimental-features = [ "nix-command" "flakes" "repl-flake" ];
+ warn-dirty = false;
+ #flake-registry = ""; # Disable global flake registry This is a hold-over setting from Misterio77. Not sure significance but likely to do with nix.registry entry below.
+ };
+
+ # Add each flake input as a registry to make nix3 commands consistent with your flake
+ #registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
+
+ # Add nixpkgs input to NIX_PATH
+ # This lets nix2 commands still use <nixpkgs>
+ #nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
+
+ # Garbage Collection
+ gc = {
+ automatic = true;
+ dates = "weekly";
+ randomizedDelaySec = "14m";
+ # Keep the last 2 generations
+ options = "--delete-older-than +2";
+ };
+
+ };
+}