From ccaff56e932bf51b82a64f81949b36596d1556fc Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 25 Aug 2022 11:03:30 +0200 Subject: [PATCH] Use default method of cleaning up user tmpfiles --- .gitignore | 3 +-- systemd/.config/systemd/user/pikaur-cleanup.service | 9 --------- systemd/.config/systemd/user/pikaur-cleanup.timer | 9 --------- systemd/.config/systemd/user/tmpfiles-cleanup.service | 9 --------- systemd/.config/tmpfiles/tmpfiles.conf | 5 ----- systemd/.config/user-tmpfiles/tmpfiles.conf | 6 ++++++ 6 files changed, 7 insertions(+), 34 deletions(-) delete mode 100644 systemd/.config/systemd/user/pikaur-cleanup.service delete mode 100644 systemd/.config/systemd/user/pikaur-cleanup.timer delete mode 100644 systemd/.config/systemd/user/tmpfiles-cleanup.service delete mode 100644 systemd/.config/tmpfiles/tmpfiles.conf create mode 100644 systemd/.config/user-tmpfiles/tmpfiles.conf diff --git a/.gitignore b/.gitignore index f4beeab..2d7cb1d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,4 @@ vim/.vim/.netrwhist zsh/.config/zsh/.chpwd-recent-dirs # Ignore the installation of services for now. -systemd/.config/systemd/user/default.target.wants -systemd/.config/systemd/user/timers.target.wants +systemd/.config/systemd/user/*.target.wants diff --git a/systemd/.config/systemd/user/pikaur-cleanup.service b/systemd/.config/systemd/user/pikaur-cleanup.service deleted file mode 100644 index f0ac742..0000000 --- a/systemd/.config/systemd/user/pikaur-cleanup.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Clean up locally built pikaur packages - -[Service] -Type=oneshot -ExecStart=/usr/bin/paccache -c %h/.cache/pikaur/pkg -r --nocolor -v -ExecStart=/usr/bin/paccache -c %h/.cache/pikaur/pkg -r --nocolor -v -u -k0 -ExecStart=/usr/bin/paccache -c %h/.cache/pacman/pkgs -r --nocolor -v -ExecStart=/usr/bin/paccache -c %h/.cache/pacman/pkgs -r --nocolor -v -u -k0 diff --git a/systemd/.config/systemd/user/pikaur-cleanup.timer b/systemd/.config/systemd/user/pikaur-cleanup.timer deleted file mode 100644 index c7428be..0000000 --- a/systemd/.config/systemd/user/pikaur-cleanup.timer +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Periodically clean pikaur pkgs - -[Timer] -Persistent=True -OnCalendar=weekly - -[Install] -WantedBy=timers.target diff --git a/systemd/.config/systemd/user/tmpfiles-cleanup.service b/systemd/.config/systemd/user/tmpfiles-cleanup.service deleted file mode 100644 index 4521a13..0000000 --- a/systemd/.config/systemd/user/tmpfiles-cleanup.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Cleanup of temporary files - -[Service] -Type=oneshot -ExecStart=/bin/systemd-tmpfiles --root=%h --clean %h/.config/tmpfiles/tmpfiles.conf - -[Install] -WantedBy=default.target diff --git a/systemd/.config/tmpfiles/tmpfiles.conf b/systemd/.config/tmpfiles/tmpfiles.conf deleted file mode 100644 index 41f6e55..0000000 --- a/systemd/.config/tmpfiles/tmpfiles.conf +++ /dev/null @@ -1,5 +0,0 @@ -#Type Path Mode UID GID Age Argument - e /.cache/spotify - - - 30d - - e /.cache/chromium - - - 30d - - e /.cache/mozilla - - - 30d - - e /Downloads - - - 7d - diff --git a/systemd/.config/user-tmpfiles/tmpfiles.conf b/systemd/.config/user-tmpfiles/tmpfiles.conf new file mode 100644 index 0000000..7d41043 --- /dev/null +++ b/systemd/.config/user-tmpfiles/tmpfiles.conf @@ -0,0 +1,6 @@ +#Type Path Mode UID GID Age Argument +e %C/spotify - - - 30d - +e %C/chromium - - - 30d - +e %C/mozilla - - - 30d - +e %C/pacman - - - 30d - +e %h/Downloads - - - 7d -