restic: Set nice and ionice
This commit is contained in:
parent
5838b757f4
commit
dd01dc72a8
|
@ -1,5 +1,6 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
let
|
let
|
||||||
|
name = "${config.networking.hostName}-system";
|
||||||
excludes = [
|
excludes = [
|
||||||
# General
|
# General
|
||||||
"/home/*/Downloads/"
|
"/home/*/Downloads/"
|
||||||
|
@ -41,7 +42,7 @@ let
|
||||||
maybePath = path: (lib.optional (builtins.pathExists path) (toString path));
|
maybePath = path: (lib.optional (builtins.pathExists path) (toString path));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.restic.backups."${config.networking.hostName}-system" = {
|
services.restic.backups."${name}" = {
|
||||||
passwordFile = toString (../secrets/restic_password);
|
passwordFile = toString (../secrets/restic_password);
|
||||||
s3CredentialsFile = toString ../secrets/s3_credentials;
|
s3CredentialsFile = toString ../secrets/s3_credentials;
|
||||||
repository = "s3:https://s3.eu-central-1.wasabisys.com/sbruder-restic";
|
repository = "s3:https://s3.eu-central-1.wasabisys.com/sbruder-restic";
|
||||||
|
@ -63,4 +64,10 @@ in
|
||||||
RandomizedDelaySec = "2h";
|
RandomizedDelaySec = "2h";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.services."restic-backups-${name}".serviceConfig = {
|
||||||
|
"Nice" = 10;
|
||||||
|
"IOSchedulingClass" = "best-effort";
|
||||||
|
"IOSchedulingPriority" = 7;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue