Add backups for monitoring01
Some checks failed
Run nix flake check / flake-check (push) Failing after 3m30s

This commit is contained in:
Torjus Håkestad 2025-01-27 23:03:45 +01:00
parent eb0e2a0877
commit 4af1bded61
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4
2 changed files with 15 additions and 0 deletions

View File

@ -229,6 +229,7 @@
)
./hosts/monitoring01
sops-nix.nixosModules.sops
backup-helper.nixosModules.backup-helper
];
};
jelly01 = nixpkgs.lib.nixosSystem {

View File

@ -51,10 +51,24 @@
vim
wget
git
sqlite
];
services.qemuGuest.enable = true;
sops.secrets."backup_helper_secret" = { };
backup-helper = {
enable = true;
password-file = "/run/secrets/backup_helper_secret";
backup-dirs = [
"/var/lib/grafana/plugins"
];
backup-commands = [
# "grafana.db:${pkgs.sqlite}/bin/sqlite /var/lib/grafana/data/grafana.db .dump"
"grafana.db:${pkgs.sqlite}/bin/sqlite3 /var/lib/grafana/data/grafana.db .dump"
];
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];