summary refs log tree commit diff stats
path: root/system/settings
diff options
context:
space:
mode:
Diffstat (limited to 'system/settings')
-rw-r--r--system/settings/configuration/nix.nix3
-rw-r--r--system/settings/user-interface.nix9
2 files changed, 11 insertions, 1 deletions
diff --git a/system/settings/configuration/nix.nix b/system/settings/configuration/nix.nix
index 6b6d51b3..ff870540 100644
--- a/system/settings/configuration/nix.nix
+++ b/system/settings/configuration/nix.nix
@@ -1,4 +1,5 @@
 { config
+, lib
 , pkgs
 , ...
 }: {
@@ -22,7 +23,7 @@
     '';
 
     gc = {
-      automatic = true;
+      automatic = lib.mkDefault true;
       options = "--delete-older-than 14d";
     };
   };
diff --git a/system/settings/user-interface.nix b/system/settings/user-interface.nix
index 915c3ec4..e2784743 100644
--- a/system/settings/user-interface.nix
+++ b/system/settings/user-interface.nix
@@ -61,6 +61,15 @@
 
   programs.dconf.enable = true;
 
+  programs.nh = {
+    enable = true;
+    clean = {
+      enable = true;
+      extraArgs = "--keep-since 14d";
+    };
+  };
+  nix.gc.automatic = ! config.programs.nh.enable;
+
   imports = [
     ./services/xserver.nix
   ];