sora: init restic
All checks were successful
flake check / check (push) Successful in 10m29s
fmt check / check (push) Successful in 1m0s

This commit is contained in:
notohh 2023-12-31 09:24:32 -05:00
parent fc52d3e0ef
commit 394fa4799a
Signed by: notohh
GPG key ID: BD47506D475EE86D
2 changed files with 36 additions and 0 deletions

View file

@ -4,6 +4,7 @@
./uptimekuma.nix
./ntfy-sh.nix
./tailscale.nix
./restic.nix
./factorio.nix
# ./minecraft.nix
# ./foundryvtt.nix

View file

@ -0,0 +1,35 @@
{
pkgs,
config,
...
}: {
sops.secrets = {
restic-repo-pwd-sora = {};
sora-b2 = {};
};
environment.systemPackages = [pkgs.restic];
services.restic = {
backups = {
sora = {
user = "root";
paths = [
"/var/lib/uptime-kuma"
"/var/lib/ntfy-sh"
];
pruneOpts = [
"--keep-daily=8"
"--keep-weekly=6"
"--keep-monthly=5"
];
repository = "b2:sora-b2";
initialize = true;
passwordFile = config.sops.secrets.restic-repo-pwd-sora.path;
environmentFile = config.sops.secrets.sora-b2.path;
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
};
};
};
}