still enable rollback tool even for disabled restic instances
This commit is contained in:
parent
a753254c0e
commit
e6c56891e1
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ let
|
||||||
shblib = pkgs.callPackage ../../lib {};
|
shblib = pkgs.callPackage ../../lib {};
|
||||||
|
|
||||||
instanceOptions = {
|
instanceOptions = {
|
||||||
enable = lib.mkEnableOption "shb restic";
|
enable = lib.mkEnableOption "shb restic. A disabled instance will not backup data anymore but still provides the helper tool to introspect and rollback snapshots";
|
||||||
|
|
||||||
passphraseFile = lib.mkOption {
|
passphraseFile = lib.mkOption {
|
||||||
description = "Encryption key for the backups.";
|
description = "Encryption key for the backups.";
|
||||||
|
@ -175,7 +175,7 @@ in
|
||||||
|
|
||||||
mkSettings = name: instance: builtins.map (mkRepositorySettings name instance) instance.repositories;
|
mkSettings = name: instance: builtins.map (mkRepositorySettings name instance) instance.repositories;
|
||||||
in
|
in
|
||||||
lib.flatten (lib.attrsets.mapAttrsToList mkSettings enabledInstances);
|
lib.flatten (lib.attrsets.mapAttrsToList mkSettings cfg.instances);
|
||||||
|
|
||||||
services.restic.backups =
|
services.restic.backups =
|
||||||
let
|
let
|
||||||
|
@ -271,7 +271,7 @@ in
|
||||||
'';
|
'';
|
||||||
mkSettings = name: instance: builtins.map (mkResticBinary name instance) instance.repositories;
|
mkSettings = name: instance: builtins.map (mkResticBinary name instance) instance.repositories;
|
||||||
in
|
in
|
||||||
lib.flatten (lib.attrsets.mapAttrsToList mkSettings enabledInstances);
|
lib.flatten (lib.attrsets.mapAttrsToList mkSettings cfg.instances);
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue