tv w110er nix.daemon*: admit NixOS 21.11

This commit is contained in:
tv 2021-12-10 23:40:36 +01:00
parent 52fcfb00fd
commit 30bdb1e7e5

View File

@ -1,7 +1,6 @@
with import <stockholm/lib>; { pkgs, ... }: let
{ pkgs, ... }: lib = import <stockholm/lib>;
in {
{
imports = [ imports = [
../smartd.nix ../smartd.nix
{ {
@ -16,6 +15,18 @@ with import <stockholm/lib>;
# "nvidia-settings" # "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 = '' boot.extraModprobeConfig = ''
@ -35,13 +46,6 @@ with import <stockholm/lib>;
networking.wireless.enable = true; networking.wireless.enable = true;
nix = {
buildCores = 4;
maxJobs = 4;
daemonIONiceLevel = 1;
daemonNiceLevel = 1;
};
services.logind.extraConfig = '' services.logind.extraConfig = ''
HandleHibernateKey=ignore HandleHibernateKey=ignore
HandleLidSwitch=ignore HandleLidSwitch=ignore