{ lib, ... }:
{
systemd.services.nix-daemon.serviceConfig = {
CPUSchedulingPolicy = lib.mkForce "batch";
IOSchedulingClass = lib.mkForce "best-effort";
# 0: high priority, 7: low priority
IOSchedulingPriority = lib.mkForce 4;
Nice = 0;
};
systemd.services.nix-gc.serviceConfig = {
CPUSchedulingPolicy = "idle";
IOSchedulingClass = "idle";
IOSchedulingPriority = 7;
Nice = 19;
};
systemd.sleep.extraConfig = ''
AllowSuspend=no
AllowHibernation=no
'';
}