diff options
author | Alan Pearce | 2019-07-26 11:37:13 +0200 |
---|---|---|
committer | Alan Pearce | 2019-07-26 11:37:13 +0200 |
commit | dd4e45818a2a98272851210254e5feacdbdf7c55 (patch) | |
tree | f19c73b237d8cff31e8f5e119ebb2ea14da7a006 /modules | |
parent | e6e92c12ae75663c4cc45502031056d7b94ea8d5 (diff) | |
download | nixfiles-dd4e45818a2a98272851210254e5feacdbdf7c55.tar.lz nixfiles-dd4e45818a2a98272851210254e5feacdbdf7c55.tar.zst nixfiles-dd4e45818a2a98272851210254e5feacdbdf7c55.zip |
UI: auto-clear old trash items weekly
Diffstat (limited to 'modules')
-rw-r--r-- | modules/user-interface.nix | 17 |
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: |