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