backups: rename stores -> repos to match restic
terminology, update description
This commit is contained in:
parent
cffd3d002e
commit
68a19e5754
|
@ -59,7 +59,7 @@
|
||||||
database-password-file = config.age.secrets.keycloak-database-password.path;
|
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;
|
passwordFile = config.age.secrets."restic-repo-storagebox".path;
|
||||||
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
|
repository = "sftp:u377325@u377325.your-storagebox.de:/backups";
|
||||||
};
|
};
|
||||||
|
|
|
@ -16,11 +16,10 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.pub-solar-os.backups = {
|
options.pub-solar-os.backups = {
|
||||||
stores =
|
repos =
|
||||||
with lib;
|
|
||||||
mkOption {
|
mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Periodic backups to create with Restic.
|
Configuration of Restic repositories.
|
||||||
'';
|
'';
|
||||||
type = types.attrsOf (
|
type = types.attrsOf (
|
||||||
types.submodule (
|
types.submodule (
|
||||||
|
@ -253,17 +252,17 @@ in
|
||||||
config = {
|
config = {
|
||||||
services.restic.backups =
|
services.restic.backups =
|
||||||
let
|
let
|
||||||
stores = config.pub-solar-os.backups.stores;
|
repos = config.pub-solar-os.backups.repos;
|
||||||
backups = config.pub-solar-os.backups.backups;
|
backups = config.pub-solar-os.backups.backups;
|
||||||
|
|
||||||
storeNames = builtins.attrNames stores;
|
storeNames = builtins.attrNames repos;
|
||||||
backupNames = builtins.attrNames backups;
|
backupNames = builtins.attrNames backups;
|
||||||
|
|
||||||
createBackups =
|
createBackups =
|
||||||
backupName:
|
backupName:
|
||||||
map (storeName: {
|
map (storeName: {
|
||||||
name = "${backupName}-${storeName}";
|
name = "${backupName}-${storeName}";
|
||||||
value = stores."${storeName}" // backups."${backupName}";
|
value = repos."${storeName}" // backups."${backupName}";
|
||||||
}) storeNames;
|
}) storeNames;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue