add reformatted backups as test

This commit is contained in:
2025-10-18 02:04:48 -05:00
parent 93a3b83127
commit bb65d89c39
4 changed files with 21 additions and 1 deletions

View File

@@ -37,6 +37,10 @@ in
type = lib.types.str;
description = "base domain used for reverse proxy";
};
backup_repo = lib.mkOption {
type = lib.types.path;
default = "/holocron/archives/homelab";
};
};
# the order determines the order in glance :3
@@ -73,5 +77,21 @@ in
group = cfg.media_group;
};
};
services.borgbackup.jobs = lib.attrsets.mapAttrs (name: arg: {
repo = cfg.backup_repo;
paths = arg.paths;
compression = "auto,zstd";
startAt = "daily";
encryption.mode = "repokey";
encryption.passCommand = "cat ${config.sops.secrets."borg_passwd".path}";
}) config.system.backups.baks;
sops.secrets = {
"borg_passwd" = {
owner = "root";
group = "root";
};
};
};
}