backups woo

This commit is contained in:
Daniel Olsen 2025-01-20 16:36:52 +01:00
parent 0c46f6e4b2
commit 8a8488aa14

View File

@ -5,10 +5,36 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = imports = [ # Include the results of the hardware scan.
[ # Include the results of the hardware scan. ./hardware-configuration.nix
./hardware-configuration.nix ];
services.restic.backups."main" = {
repositoryFile = "/root/restic-main-repo";
passwordFile = "/root/restic-main-password";
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 12"
"--keep-yearly 2"
]; ];
paths = [
"/var/lib"
"/home/daniel"
];
exclude = [
"/home/*/.cache"
"/home/*/.local/Trash"
"/home/*/.local/share/Steam/*"
"!/home/*/.local/share/Steam/steamapps/compatdata"
"/home/*/.cargo"
];
};
services.postgresql.enable = true; services.postgresql.enable = true;
services.postgresql.package = pkgs.postgresql_15; services.postgresql.package = pkgs.postgresql_15;