summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/user-interface.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/modules/user-interface.nix b/modules/user-interface.nix
index aaa5e88d..a11c4b59 100644
--- a/modules/user-interface.nix
+++ b/modules/user-interface.nix
@@ -86,6 +86,23 @@ in
     };
   };
 
+  systemd.user.services.trash-clean = {
+    path = with pkgs; [ trash-cli ];
+    description = "Remove old files from FreeDesktop.org trash";
+
+    serviceConfig = {
+      Type = "oneshot";
+    };
+    script = "trash-empty 30";
+  };
+  systemd.user.timers.trash-clean = {
+    wantedBy = [ "default.target" ];
+    timerConfig = {
+      OnCalendar = "weekly";
+      Persistent = true;
+    };
+  };
+
   environment.variables = {
     # This is required so that GTK applications launched from Emacs
     # get properly themed: