From 70ee0fc811db0c5f316e27ae5b8a93e4b8550105 Mon Sep 17 00:00:00 2001 From: ediblerope Date: Wed, 29 Apr 2026 11:17:51 +0100 Subject: [PATCH] common: cap nix-daemon CPUWeight at 50 to keep services responsive Heavy local builds (gnupg/openldap checkPhase under a freshly-bumped nixpkgs lock) were saturating CPU and starving AdGuard on the mediaserver, making DNS effectively unresponsive until the build finished or got cancelled. Halving the daemon's CPU share leaves headroom for latency-sensitive services without meaningfully slowing builds on an otherwise idle box. Co-Authored-By: Claude Opus 4.7 --- common.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common.nix b/common.nix index af931ef..1b6d1a0 100644 --- a/common.nix +++ b/common.nix @@ -61,6 +61,12 @@ nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Keep services responsive while heavy local builds run (gnupg/openldap + # checkPhase etc. were starving AdGuard until the binary cache catches up). + # Default CPUWeight is 100; halving the daemon's share lets latency-sensitive + # services breathe without meaningfully slowing builds on an idle box. + systemd.services.nix-daemon.serviceConfig.CPUWeight = 50; + # Use latest kernel boot.kernelPackages = pkgs.linuxPackages_latest;