only one go proc for restic on vpsfree, to see if it helps with memory usage

This commit is contained in:
Cyryl Płotnicki 2023-05-06 08:27:43 +01:00
parent 296e0a4483
commit 13e70c1757

View file

@ -1,12 +1,9 @@
{
config,
pkgs,
...
}: let
{ config, pkgs, ... }:
let
genericBackupPath = "/var/lib/backups/";
containersBackupPath = "${genericBackupPath}/oci-containers/";
in rec {
environment.systemPackages = with pkgs; [restic];
environment.systemPackages = with pkgs; [ restic ];
sops.secrets."restic-backups-b2-repo-password" = {
sopsFile = ./restic.sops.yaml;
@ -30,13 +27,17 @@ in rec {
mkdir -p ${containersBackupPath}/
${pkgs.podman}/bin/podman volume export woodpecker-server-data -o ${containersBackupPath}/woodpecker.tar
'';
timerConfig = {OnCalendar = "hourly";};
environmentFile = "${config.sops.secrets.restic-backups-b2-environment.path}";
timerConfig = { OnCalendar = "hourly"; };
environmentFile =
"${config.sops.secrets.restic-backups-b2-environment.path}";
};
};
systemd.services.restic-backups-b2.serviceConfig = {
Nice = 19;
IOSchedulingClass = "idle";
systemd.services.restic-backups-b2 = {
environment = { GOMAXPROCS = "1"; };
serviceConfig = {
Nice = 19;
IOSchedulingClass = "idle";
};
};
}