From 1df9a8752054e81f57444137da9c3664c7704de5 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 20 Nov 2021 16:29:48 +0100 Subject: [PATCH] Make nix scheduling options compatible with 21.11 --- modules/nix.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/nix.nix b/modules/nix.nix index 28cf19c..8d07809 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -64,11 +64,15 @@ in keep-outputs = true keep-derivations = true ''; - + } // (if (builtins.compareVersions config.system.nixos.release "21.11" != -1) then { # Make nix build in background less noticeable + daemonCPUSchedPolicy = "batch"; + daemonIOSchedPriority = 5; # 0-7 + } else { + # TODO 21.11: remove daemonNiceLevel = 10; daemonIONiceLevel = 5; # 0-7 - }; + }); nixpkgs.overlays = with inputs; [ self.overlay