Limit resource usage when performing upgrades
This commit is contained in:
parent
bd493ea8ea
commit
255cb34846
|
@ -180,13 +180,17 @@ with pkgs;
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
flake = "/home/coolneng/system";
|
flake = "/home/coolneng/system";
|
||||||
flags = [
|
flags =
|
||||||
"--update-input"
|
[ "--update-input agenix --update-input nixpkgs" "--commit-lock-file" ];
|
||||||
"agenix"
|
};
|
||||||
"--update-input"
|
|
||||||
"nixpkgs"
|
# Limit the memory and CPU use of Nix
|
||||||
"--commit-lock-file"
|
systemd.services.nixos-upgrade.serviceConfig = {
|
||||||
];
|
MemoryHigh = [ "500M" ];
|
||||||
|
MemoryMax = [ "2048M" ];
|
||||||
|
CPUWeight = [ "20" ];
|
||||||
|
CPUQuota = [ "85%" ];
|
||||||
|
IOWeight = [ "20" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configure git for auto-upgrade
|
# Configure git for auto-upgrade
|
||||||
|
|
Loading…
Reference in New Issue