From 94c0961cb0c803f48b888e1b260828aa6d343c22 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Fri, 23 Aug 2024 10:49:58 +0100 Subject: [PATCH] Limit resources for nixos-upgrade systemd service --- system/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/system/default.nix b/system/default.nix index 00140bcb..da01e405 100644 --- a/system/default.nix +++ b/system/default.nix @@ -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;