zellij: added systemd unit to cleanup killed sessions every day at 4:00

This commit is contained in:
Tigor Hutasuhut 2024-11-04 21:44:42 +07:00
parent 1bb6057a32
commit 202375815f

View file

@ -23,6 +23,27 @@ in
programs.zellij.enable = true; programs.zellij.enable = true;
programs.zellij.package = unstable.zellij; programs.zellij.package = unstable.zellij;
systemd.user = {
services.zellij-cleanup = {
Service = {
Description = "Zellij cleanup killed sessions";
ExecStart = "${unstable.zellij}/bin/zellij delete-all-sessions --yes";
};
};
timers.zellij-cleanup = {
Unit = {
Description = "Zellij cleanup killed sessions";
};
Timer = {
OnCalendar = "*-*-* 4:00:00";
Persistent = true;
};
Install = {
WantedBy = [ "timers.target" ];
};
};
};
# Uses initExtraFirst instead of initExtra # Uses initExtraFirst instead of initExtra
# to avoid loading of zsh plugins before zellij loads. # to avoid loading of zsh plugins before zellij loads.
# #