fix: pass lib to backup module and fixup backup configuration

Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
Chinmay D. Pai 2024-09-30 11:16:19 +05:30
parent 104d4b6c8d
commit 1a54eab3fb
Signed by: thunderbottom
GPG Key ID: 75507BE256F40CED
3 changed files with 4 additions and 7 deletions

View File

@ -3,9 +3,7 @@
lib, lib,
... ...
}: }:
with lib; let with lib; {
inherit (utils.systemdUtils.unitOptions) unitOption;
in {
options.snowflake.services.backups = { options.snowflake.services.backups = {
enable = mkEnableOption "Enable restic backup service"; enable = mkEnableOption "Enable restic backup service";
@ -27,7 +25,7 @@ in {
default = {}; default = {};
type = types.attrsOf ( type = types.attrsOf (
types.submodule ( types.submodule (
{_}: { {lib, ...}: {
options = { options = {
dynamicFilesFrom = mkOption { dynamicFilesFrom = mkOption {
type = types.nullOr types.str; type = types.nullOr types.str;
@ -63,7 +61,6 @@ in {
}; };
timerConfig = mkOption { timerConfig = mkOption {
type = types.attrsOf unitOption;
default = { default = {
OnCalendar = "daily"; OnCalendar = "daily";
}; };

View File

@ -64,7 +64,7 @@
}; };
}; };
snowflake.services.backups.paperless.config = { snowflake.services.backups.config.paperless = {
dynamicFilesFrom = let dynamicFilesFrom = let
path = config.services.paperless.dataDir; path = config.services.paperless.dataDir;
in '' in ''

View File

@ -77,7 +77,7 @@
}; };
}; };
snowflake.services.backups.vaultwarden.paths = [ snowflake.services.backups.config.vaultwarden.paths = [
"/var/lib/bitwarden_rs" "/var/lib/bitwarden_rs"
]; ];
}; };