sora: init restic
All checks were successful
flake check / check (push) Successful in 10m29s
fmt check / check (push) Successful in 1m0s
All checks were successful
flake check / check (push) Successful in 10m29s
fmt check / check (push) Successful in 1m0s
This commit is contained in:
parent
fc52d3e0ef
commit
394fa4799a
2 changed files with 36 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
|||
./uptimekuma.nix
|
||||
./ntfy-sh.nix
|
||||
./tailscale.nix
|
||||
./restic.nix
|
||||
./factorio.nix
|
||||
# ./minecraft.nix
|
||||
# ./foundryvtt.nix
|
||||
|
|
35
hosts/sora/services/restic.nix
Normal file
35
hosts/sora/services/restic.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue