summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/marvin.nix1
-rw-r--r--system/settings/programs/nh.nix20
-rw-r--r--system/settings/user-interface.nix9
3 files changed, 21 insertions, 9 deletions
diff --git a/system/marvin.nix b/system/marvin.nix
index a2c32efb..4579e23c 100644
--- a/system/marvin.nix
+++ b/system/marvin.nix
@@ -2,6 +2,7 @@
   imports = [
     ./settings/darwin.nix
     ./settings/dev.nix
+    ./settings/programs/nh.nix
     ./settings/programs/shell.nix
   ];
 
diff --git a/system/settings/programs/nh.nix b/system/settings/programs/nh.nix
new file mode 100644
index 00000000..10738de0
--- /dev/null
+++ b/system/settings/programs/nh.nix
@@ -0,0 +1,20 @@
+{ config, ... }: {
+  programs.nh =
+    let
+      flake = builtins.toString ../../..;
+    in
+    {
+      enable = true;
+      os = {
+        inherit flake;
+      };
+      home = {
+        inherit flake;
+      };
+      clean = {
+        enable = true;
+        extraArgs = "--keep-since 14d";
+      };
+    };
+  nix.gc.automatic = !config.programs.nh.clean.enable;
+}
diff --git a/system/settings/user-interface.nix b/system/settings/user-interface.nix
index d8ae301a..27f1d9aa 100644
--- a/system/settings/user-interface.nix
+++ b/system/settings/user-interface.nix
@@ -50,15 +50,6 @@
     };
   };
 
-  programs.nh = {
-    enable = true;
-    flake = builtins.toString ../..;
-    clean = {
-      enable = true;
-      extraArgs = "--keep-since 14d";
-    };
-  };
-
   imports = [
     ./services/xserver.nix
   ];