summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
Diffstat (limited to 'user')
-rw-r--r--user/settings/darwin.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/user/settings/darwin.nix b/user/settings/darwin.nix
index 740b4314..fb6cf196 100644
--- a/user/settings/darwin.nix
+++ b/user/settings/darwin.nix
@@ -42,6 +42,29 @@
 
   home.file.".hushlogin".text = "";
 
+  launchd.agents = {
+    home-manager-expire-generations = {
+      enable = true;
+
+      config = {
+        ProgramArguments = [
+          "${pkgs.home-manager}/bin/home-manager"
+          "expire-generations"
+          "-30 days"
+        ];
+        KeepAlive = false;
+        RunAtLoad = false;
+        StartCalendarInterval = [{
+          Hour = 12;
+          Minute = 00;
+          Weekday = 6; # Saturday
+        }];
+        ProcessType = "Background";
+        LowPriorityBackgroundIO = true;
+      };
+    };
+  };
+
   programs.zsh.shellAliases = {
     da = "darwin-rebuild";
     das = "darwin-rebuild switch";