From 68a19e5754ed4d945d86889adde9907a52ddc51a Mon Sep 17 00:00:00 2001 From: teutat3s Date: Mon, 26 Aug 2024 20:05:24 +0200 Subject: [PATCH] backups: rename stores -> repos to match restic terminology, update description --- hosts/nachtigall/configuration.nix | 2 +- modules/backups/default.nix | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hosts/nachtigall/configuration.nix b/hosts/nachtigall/configuration.nix index 43a3c6e..cdc8243 100644 --- a/hosts/nachtigall/configuration.nix +++ b/hosts/nachtigall/configuration.nix @@ -59,7 +59,7 @@ database-password-file = config.age.secrets.keycloak-database-password.path; }; - pub-solar-os.backups.stores.storagebox = { + pub-solar-os.backups.repos.storagebox = { passwordFile = config.age.secrets."restic-repo-storagebox".path; repository = "sftp:u377325@u377325.your-storagebox.de:/backups"; }; diff --git a/modules/backups/default.nix b/modules/backups/default.nix index 996392c..48db58c 100644 --- a/modules/backups/default.nix +++ b/modules/backups/default.nix @@ -16,11 +16,10 @@ let in { options.pub-solar-os.backups = { - stores = - with lib; + repos = mkOption { description = '' - Periodic backups to create with Restic. + Configuration of Restic repositories. ''; type = types.attrsOf ( types.submodule ( @@ -253,17 +252,17 @@ in config = { services.restic.backups = let - stores = config.pub-solar-os.backups.stores; + repos = config.pub-solar-os.backups.repos; backups = config.pub-solar-os.backups.backups; - storeNames = builtins.attrNames stores; + storeNames = builtins.attrNames repos; backupNames = builtins.attrNames backups; createBackups = backupName: map (storeName: { name = "${backupName}-${storeName}"; - value = stores."${storeName}" // backups."${backupName}"; + value = repos."${storeName}" // backups."${backupName}"; }) storeNames; in