formatting

This commit is contained in:
2026-06-13 14:29:16 -05:00
parent 0edc17ecde
commit a34c177b69
+20 -20
View File
@@ -36,27 +36,27 @@ in {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# backups homelab with borg # backups homelab with borg
services.borgbackup.jobs.homelab = lib.mkIf (cfg.baks != {}) { services.borgbackup.jobs.homelab = lib.mkIf (cfg.baks != {}) {
archiveBaseName = "homelab"; archiveBaseName = "homelab";
repo = cfg.backup_repo; repo = cfg.backup_repo;
paths = lib.flatten (lib.attrsets.mapAttrsToList (_: arg: arg.paths) cfg.baks); paths = lib.flatten (lib.attrsets.mapAttrsToList (_: arg: arg.paths) cfg.baks);
compression = "auto,zstd"; compression = "auto,zstd";
startAt = "03:30"; startAt = "03:30";
group = "archives"; group = "archives";
encryption.mode = "repokey-blake2"; encryption.mode = "repokey-blake2";
encryption.passCommand = "cat ${sec."borg_passwd".path}"; encryption.passCommand = "cat ${sec."borg_passwd".path}";
preHook = '' preHook = ''
systemctl start mysql-backup.service systemctl start mysql-backup.service
systemctl start $(systemctl list-unit-files 'postgresqlBackup-*.service' --no-legend --no-pager | cut -d' ' -f1) systemctl start $(systemctl list-unit-files 'postgresqlBackup-*.service' --no-legend --no-pager | cut -d' ' -f1)
''; '';
extraArgs = ["--verbose" "--show-rc" "--umask" "0007"]; extraArgs = ["--verbose" "--show-rc" "--umask" "0007"];
extraCreateArgs = ["--list" "--stats" "--filter" "AME"]; extraCreateArgs = ["--list" "--stats" "--filter" "AME"];
prune.keep = { prune.keep = {
within = "1d"; # Keep all archives from the last day within = "1d"; # Keep all archives from the last day
daily = 7; daily = 7;
weekly = 12; weekly = 12;
monthly = -1; # Keep at least one archive for each month monthly = -1; # Keep at least one archive for each month
};
}; };
};
# mysql backups currently minecraft_recpro is the only thing using this # mysql backups currently minecraft_recpro is the only thing using this
services.mysqlBackup = lib.mkIf (config.services.mysql.ensureDatabases != []) { services.mysqlBackup = lib.mkIf (config.services.mysql.ensureDatabases != []) {