auto wake and sleep for garbage collection

only sleep again for non-servers
This commit is contained in:
Noah Masur 2023-06-01 22:42:06 -04:00
parent 09de243bd3
commit ed19eaafd1

View File

@ -11,6 +11,10 @@
# This setting only applies to NixOS, different on Darwin
nix.gc.dates = "weekly";
systemd.timers.nix-gc.timerConfig = { WakeSystem = true; };
systemd.services.nix-gc.postStop =
lib.mkIf (!config.server) "systemctl suspend";
};
}