fix: pass lib to backup module and fixup backup configuration
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
104d4b6c8d
commit
1a54eab3fb
@ -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";
|
||||||
};
|
};
|
||||||
|
@ -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 ''
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
snowflake.services.backups.vaultwarden.paths = [
|
snowflake.services.backups.config.vaultwarden.paths = [
|
||||||
"/var/lib/bitwarden_rs"
|
"/var/lib/bitwarden_rs"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user