feat(restic): limit resource usage
This commit is contained in:
parent
436ba2719f
commit
b57b2293ca
2 changed files with 21 additions and 0 deletions
modules
19
modules/restic.nix
Normal file
19
modules/restic.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
config = {
|
||||
systemd.services = mapAttrs' (name: backup:
|
||||
nameValuePair "restic-backups-${name}" ({
|
||||
serviceConfig = {
|
||||
CPUWeight = 25;
|
||||
MemoryHigh = "50%";
|
||||
MemoryMax = "75%";
|
||||
IOWeight = 50;
|
||||
IOSchedulingClass = "idle";
|
||||
IOSchedulingPriority = 7;
|
||||
};
|
||||
})) config.services.restic.backups;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue