Limit resources for nixos-upgrade systemd service

This commit is contained in:
Evie Litherland-Smith 2024-08-23 10:49:58 +01:00
parent 2231dc65a9
commit 94c0961cb0

View file

@ -1,5 +1,6 @@
{
config,
lib,
pkgs,
iosevkaCustom,
...
@ -52,15 +53,19 @@
randomizedDelaySec = "15min";
flags = [
"--accept-flake-config"
"--keep-going"
"--max-jobs"
"1"
"--option"
"extra-binary-caches"
"https://nix.xenia.me.uk"
];
};
};
systemd.services = lib.mkIf config.system.autoUpgrade.enable {
nixos-upgrade.serviceConfig = {
CPUQuota = "75%";
CPUWeight = 20;
IOWeight = 20;
};
};
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;