backups: rename pub-solar-os.backups.backups -> pub-solar-os.backups.restic

This commit is contained in:
teutat3s 2024-08-28 16:53:06 +02:00
parent fb8ee1278a
commit 751d82f7e3
Signed by: teutat3s
GPG key ID: 4FA1D3FA524F22C1
2 changed files with 6 additions and 6 deletions

View file

@ -61,7 +61,7 @@ in
}; };
}; };
backups = mkOption { restic = mkOption {
description = '' description = ''
Periodic backups to create with Restic. Periodic backups to create with Restic.
''; '';
@ -174,7 +174,7 @@ in
runCheck = mkOption { runCheck = mkOption {
type = types.bool; type = types.bool;
default = (builtins.length config.pub-solar-os.backups.backups.${name}.checkOpts > 0); default = (builtins.length config.pub-solar-os.backups.restic.${name}.checkOpts > 0);
defaultText = literalExpression ''builtins.length config.services.backups.${name}.checkOpts > 0''; defaultText = literalExpression ''builtins.length config.services.backups.${name}.checkOpts > 0'';
description = "Whether to run the `check` command with the provided `checkOpts` options."; description = "Whether to run the `check` command with the provided `checkOpts` options.";
example = true; example = true;
@ -256,16 +256,16 @@ in
services.restic.backups = services.restic.backups =
let let
repos = config.pub-solar-os.backups.repos; repos = config.pub-solar-os.backups.repos;
backups = config.pub-solar-os.backups.backups; restic = config.pub-solar-os.backups.restic;
storeNames = builtins.attrNames repos; storeNames = builtins.attrNames repos;
backupNames = builtins.attrNames backups; backupNames = builtins.attrNames restic;
createBackups = createBackups =
backupName: backupName:
map (storeName: { map (storeName: {
name = "${backupName}-${storeName}"; name = "${backupName}-${storeName}";
value = repos."${storeName}" // backups."${backupName}"; value = repos."${storeName}" // restic."${backupName}";
}) storeNames; }) storeNames;
in in

View file

@ -58,7 +58,7 @@
}; };
}; };
pub-solar-os.backups.backups.keycloak = { pub-solar-os.backups.restic.keycloak = {
paths = [ "/tmp/keycloak-backup.sql" ]; paths = [ "/tmp/keycloak-backup.sql" ];
timerConfig = { timerConfig = {
OnCalendar = "*-*-* 03:00:00 Etc/UTC"; OnCalendar = "*-*-* 03:00:00 Etc/UTC";