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

View File

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

View File

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