about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--hosts/carmel/configuration.nix3
-rw-r--r--modules/systems/default.nix5
-rw-r--r--modules/systems/nix.nix17
3 files changed, 22 insertions, 3 deletions
diff --git a/hosts/carmel/configuration.nix b/hosts/carmel/configuration.nix
index 93cbd84..8f8a5fb 100644
--- a/hosts/carmel/configuration.nix
+++ b/hosts/carmel/configuration.nix
@@ -8,9 +8,6 @@
 
   nix = {
     package = pkgs.nixUnstable;
-    extraOptions = ''
-      experimental-features = nix-command flakes
-    '';
   };
 
   # Use the systemd-boot EFI boot loader.
diff --git a/modules/systems/default.nix b/modules/systems/default.nix
new file mode 100644
index 0000000..eacf54e
--- /dev/null
+++ b/modules/systems/default.nix
@@ -0,0 +1,5 @@
+{
+  imports = [
+     ./nix.nix
+  ];
+}
diff --git a/modules/systems/nix.nix b/modules/systems/nix.nix
new file mode 100644
index 0000000..4b97121
--- /dev/null
+++ b/modules/systems/nix.nix
@@ -0,0 +1,17 @@
+{ lib, pkgs, ... }:
+
+{
+  nix.extraOptions = ''
+    experimental-features = nix-command
+  '';
+
+  nix.settings = {
+    auto-optimise-store = true;
+    trusted-users = [ "root" "@wheel" ];
+  };
+
+  nix.gc = {
+    automatic = true;
+    options = "--delete-older-than 14d";
+  };
+}