Evie Litherland-Smith
8a76c27dae
Update syncthing definition to use dataDir in folder path, reduce redefinition by just changing dataDir if they should be somewhere else
47 lines
1.4 KiB
Nix
47 lines
1.4 KiB
Nix
{ config, lib, pkgs, user, ... }:
|
|
let devices = [ "Ion" "Legion" "Northstar" "Ronin" "Vanguard" ];
|
|
in {
|
|
services.syncthing = rec {
|
|
inherit user;
|
|
inherit (config.users.users.${user}) group;
|
|
enable = true;
|
|
dataDir = lib.mkDefault "/home/${user}";
|
|
systemService = true;
|
|
openDefaultPorts = true;
|
|
settings = {
|
|
devices = {
|
|
"Ion".id =
|
|
"7DD4NPH-6T2ET5A-4FCLFWW-CS6UR2W-IO5XQXC-DM5B2Q4-6X7DGU2-UKKVEAB";
|
|
"Legion".id =
|
|
"6OX54CG-EAQMXKA-K7TXB5P-G5A27HB-52JE2FA-XNAYZU6-YMIDBXP-RKPBJQV";
|
|
"Northstar".id =
|
|
"HNK5Z72-757G3BP-I4PBWXY-FM5FWCM-ES4XP56-E5ULWB5-RGRCBUI-RHWRXQV";
|
|
"Ronin".id =
|
|
"ZOL5YHK-ZZZULIE-UHGVKHW-H5E4BP7-S4CZBOX-OIZVUCV-RZUXOKA-QVBUBAJ";
|
|
"Vanguard".id =
|
|
"I366QNQ-D3FTDRX-RNOTXMW-YITZXOF-DSCDMQD-63Q72LI-ME2Y4HZ-T34RMQK";
|
|
};
|
|
folders = {
|
|
"Elfeed" = {
|
|
inherit devices;
|
|
id = "hnnxy-lb5af";
|
|
path = "${dataDir}/.elfeed";
|
|
ignorePerms = true;
|
|
};
|
|
"Pictures" = {
|
|
inherit devices;
|
|
id = "ziuj8-rm6dn";
|
|
path = "${dataDir}/Pictures";
|
|
ignorePerms = true;
|
|
};
|
|
"Zotero" = {
|
|
inherit devices;
|
|
id = "huyvn-liwc9";
|
|
path = "${dataDir}/Documents/Zotero";
|
|
ignorePerms = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|