Home-manager auto-gc

This commit is contained in:
Chris Dombroski 2024-05-27 21:55:25 -04:00
parent 4a43725e99
commit e8491afa12

View file

@ -79,12 +79,24 @@
tray.enable = true; tray.enable = true;
}; };
systemd.user.targets.tray = { systemd.user = {
services.gc = {
Service = {
Exec = "nix-collect-garbage --delete-older-than 30d";
};
};
timers.gc = {
Timer = {
OnCalendar = "weekly";
};
};
targets.tray = {
Unit = { Unit = {
Description = "System Tray"; Description = "System Tray";
Requires = [ "graphical-session-pre.target" ]; Requires = [ "graphical-session-pre.target" ];
}; };
}; };
};
nixpkgs.config = { nixpkgs.config = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "discord" ]; allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "discord" ];