Add elfeed database to syncthing

Update syncthing definition to use dataDir in folder path, reduce
redefinition by just changing dataDir if they should be somewhere else
This commit is contained in:
Evie Litherland-Smith 2023-10-22 07:39:51 +01:00
parent 7d66b5ea82
commit 8a76c27dae
2 changed files with 14 additions and 15 deletions

View file

@ -29,14 +29,7 @@ in {
}; };
}; };
services = { services = {
syncthing = let dataDir = "/var/lib/syncthing"; syncthing.dataDir = "/var/lib/syncthing";
in {
inherit dataDir;
settings.folders = {
"Pictures".path = dataDir + "/Pictures";
"Zotero".path = dataDir + "/Zotero";
};
};
openvpn = { openvpn = {
restartAfterSleep = true; restartAfterSleep = true;
servers.xenia.config = '' servers.xenia.config = ''

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, user, ... }: { config, lib, pkgs, user, ... }:
let devices = [ "Ion" "Legion" "Northstar" "Ronin" "Vanguard" ]; let devices = [ "Ion" "Legion" "Northstar" "Ronin" "Vanguard" ];
in { in {
services.syncthing = { services.syncthing = rec {
inherit user; inherit user;
inherit (config.users.users.${user}) group; inherit (config.users.users.${user}) group;
enable = true; enable = true;
@ -22,17 +22,23 @@ in {
"I366QNQ-D3FTDRX-RNOTXMW-YITZXOF-DSCDMQD-63Q72LI-ME2Y4HZ-T34RMQK"; "I366QNQ-D3FTDRX-RNOTXMW-YITZXOF-DSCDMQD-63Q72LI-ME2Y4HZ-T34RMQK";
}; };
folders = { folders = {
"Pictures" = { "Elfeed" = {
id = "ziuj8-rm6dn"; inherit devices;
path = lib.mkDefault "~/Pictures"; id = "hnnxy-lb5af";
path = "${dataDir}/.elfeed";
ignorePerms = true;
};
"Pictures" = {
inherit devices;
id = "ziuj8-rm6dn";
path = "${dataDir}/Pictures";
ignorePerms = true; ignorePerms = true;
devices = devices;
}; };
"Zotero" = { "Zotero" = {
inherit devices;
id = "huyvn-liwc9"; id = "huyvn-liwc9";
path = lib.mkDefault "~/Documents/Zotero"; path = "${dataDir}/Documents/Zotero";
ignorePerms = true; ignorePerms = true;
devices = devices;
}; };
}; };
}; };