Update the home-manager cleanup systemd unit
This commit is contained in:
parent
bba426e844
commit
22c66acd25
2 changed files with 5 additions and 3 deletions
home-manager/common
|
@ -1,17 +1,18 @@
|
|||
{ pkgs, ... }: {
|
||||
systemd.user.services.cleanup-generations = {
|
||||
systemd.user.services.cleanup-home-manager = {
|
||||
Unit = {
|
||||
Description = "Cleanup old home-manager generations";
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.writeShellScript "cleanup-generations" ''
|
||||
Environment = "PATH=${pkgs.home-manager}/bin:${pkgs.gawk}/bin:${pkgs.findutils}/bin:${pkgs.coreutils}/bin:$PATH";
|
||||
ExecStart = "${pkgs.writeShellScript "cleanup-home-manager" ''
|
||||
home-manager generations | tail -n +6 | awk '{print $5}' | xargs -I {} home-manager remove-generations {}
|
||||
''}";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers.cleanup-generations = {
|
||||
systemd.user.timers.cleanup-home-manager = {
|
||||
Unit = {
|
||||
Description = "Timer for cleaning up old home-manager generations";
|
||||
};
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
"shift+right=next_tab"
|
||||
"shift+left=previous_tab"
|
||||
"shift+up=toggle_tab_overview"
|
||||
"ctrl+t=new_tab"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue