From 30bdb1e7e535f8257f06a929012e58f421f709b0 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 10 Dec 2021 23:40:36 +0100 Subject: tv w110er nix.daemon*: admit NixOS 21.11 --- tv/2configs/hw/w110er.nix | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'tv/2configs/hw/w110er.nix') diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix index 818d1aca6..09dd9a49d 100644 --- a/tv/2configs/hw/w110er.nix +++ b/tv/2configs/hw/w110er.nix @@ -1,7 +1,6 @@ -with import ; -{ pkgs, ... }: - -{ +{ pkgs, ... }: let + lib = import ; +in { imports = [ ../smartd.nix { @@ -16,6 +15,18 @@ with import ; # "nvidia-settings" #]; } + + { + nix.buildCores = 4; + nix.maxJobs = 4; + } + (if lib.versionAtLeast (lib.versions.majorMinor lib.version) "21.11" then { + nix.daemonCPUSchedPolicy = "batch"; + nix.daemonIOSchedPriority = 1; + } else { + nix.daemonIONiceLevel = 1; + nix.daemonNiceLevel = 1; + }) ]; boot.extraModprobeConfig = '' @@ -35,13 +46,6 @@ with import ; networking.wireless.enable = true; - nix = { - buildCores = 4; - maxJobs = 4; - daemonIONiceLevel = 1; - daemonNiceLevel = 1; - }; - services.logind.extraConfig = '' HandleHibernateKey=ignore HandleLidSwitch=ignore -- cgit v1.2.3