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