diff --git a/modules/nixos/system/default.nix b/modules/nixos/system/default.nix index 982274f..96ac22b 100644 --- a/modules/nixos/system/default.nix +++ b/modules/nixos/system/default.nix @@ -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"; + }; }