mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 16:21:34 +01:00
Persist state of actual, filebrowser, memos, radicale and syncthing
This commit is contained in:
parent
eff39a6ccd
commit
1b9a26c494
5 changed files with 42 additions and 17 deletions
|
|
@ -8,6 +8,8 @@ let
|
|||
cfg = config.custom.services.syncthing;
|
||||
tailscaleCfg = config.custom.services.tailscale;
|
||||
|
||||
inherit (config.services.syncthing) dataDir;
|
||||
|
||||
useStaticTls = config.custom.sops.secrets |> lib.hasAttr "syncthing";
|
||||
in
|
||||
{
|
||||
|
|
@ -99,7 +101,7 @@ in
|
|||
genFolders =
|
||||
folders:
|
||||
lib.genAttrs folders (name: {
|
||||
path = "${config.services.syncthing.dataDir}/${name}";
|
||||
path = "${dataDir}/${name}";
|
||||
ignorePerms = false;
|
||||
devices = config.services.syncthing.settings.devices |> lib.attrNames;
|
||||
});
|
||||
|
|
@ -125,9 +127,13 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
custom.services.resticBackups.syncthing = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "syncthing.service";
|
||||
paths = [ config.services.syncthing.dataDir ];
|
||||
custom = {
|
||||
services.resticBackups.syncthing = lib.mkIf cfg.doBackups {
|
||||
conflictingService = "syncthing.service";
|
||||
paths = [ dataDir ];
|
||||
};
|
||||
|
||||
persist.directories = [ dataDir ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue