mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
services: init restic backup
activate on all relevant hosts
This commit is contained in:
parent
cc72f12a6d
commit
e9c5f1c101
4 changed files with 27 additions and 0 deletions
|
|
@ -21,6 +21,7 @@
|
||||||
../../../services/murmur.nix
|
../../../services/murmur.nix
|
||||||
../../../services/znc.nix
|
../../../services/znc.nix
|
||||||
../../../services/matrix.nix
|
../../../services/matrix.nix
|
||||||
|
../../../services/restic.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
profiles.sway
|
profiles.sway
|
||||||
profiles.kat
|
profiles.kat
|
||||||
../../../services/zfs.nix
|
../../../services/zfs.nix
|
||||||
|
../../../services/restic.nix
|
||||||
../../../services/nginx.nix
|
../../../services/nginx.nix
|
||||||
./thermal
|
./thermal
|
||||||
./vm
|
./vm
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hw.nix
|
./hw.nix
|
||||||
../../../services/zfs.nix
|
../../../services/zfs.nix
|
||||||
|
../../../services/restic.nix
|
||||||
profiles.gui
|
profiles.gui
|
||||||
profiles.sway
|
profiles.sway
|
||||||
profiles.kat
|
profiles.kat
|
||||||
|
|
|
||||||
24
services/restic.nix
Normal file
24
services/restic.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.restic.backups.tardis = {
|
||||||
|
passwordFile = "/etc/restic/system";
|
||||||
|
paths = [
|
||||||
|
"/home"
|
||||||
|
"/var/lib"
|
||||||
|
];
|
||||||
|
pruneOpts = [
|
||||||
|
"--keep-daily 7"
|
||||||
|
"--keep-weekly 5"
|
||||||
|
"--keep-monthly 12"
|
||||||
|
];
|
||||||
|
repository = "";
|
||||||
|
};
|
||||||
|
systemd.services."restic-backups-tardis".environment.RESTIC_REPOSITORY_FILE = "/etc/restic/system.repo";
|
||||||
|
|
||||||
|
services.postgresqlBackup = {
|
||||||
|
enable = config.service.postgresql.enable;
|
||||||
|
backupAll = true;
|
||||||
|
startAt = "*-*-* 23:45:00";
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue