mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 07:08:45 +08:00
make nix daemon low priority
This commit is contained in:
parent
0061d5b22c
commit
451c7160c8
@ -3,17 +3,31 @@
|
|||||||
config =
|
config =
|
||||||
{
|
{
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
nix.settings =
|
nix =
|
||||||
{
|
{
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
settings =
|
||||||
keep-outputs = true;
|
{
|
||||||
system-features = [ "big-parallel" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
keep-failed = true;
|
keep-outputs = true;
|
||||||
|
system-features = [ "big-parallel" ];
|
||||||
|
keep-failed = true;
|
||||||
|
};
|
||||||
|
daemonIOSchedClass = "idle";
|
||||||
|
daemonCPUSchedPolicy = "idle";
|
||||||
};
|
};
|
||||||
networking.hostName = hostName;
|
networking.hostName = hostName;
|
||||||
time.timeZone = "Asia/Shanghai";
|
time.timeZone = "Asia/Shanghai";
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
systemd = { extraConfig = "DefaultTimeoutStopSec=10s"; user.extraConfig = "DefaultTimeoutStopSec=10s"; };
|
systemd =
|
||||||
|
{
|
||||||
|
extraConfig = "DefaultTimeoutStopSec=10s";
|
||||||
|
user.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||||
|
} //
|
||||||
|
(
|
||||||
|
if inputs.config.services.xserver.enable then
|
||||||
|
{ services.nix-daemon.serviceConfig.Slice = "user.slice"; }
|
||||||
|
else {}
|
||||||
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user