2020-06-09 21:53:20 +02:00
|
|
|
{ config, pkgs, lib, ... }: {
|
2020-10-28 00:38:24 +01:00
|
|
|
|
|
|
|
# Syncthing configuration
|
2019-11-07 14:25:27 +01:00
|
|
|
services.syncthing = {
|
|
|
|
enable = true;
|
|
|
|
openDefaultPorts = true;
|
|
|
|
guiAddress = "0.0.0.0:8384";
|
|
|
|
dataDir = "/vault/syncthing";
|
2021-08-13 11:00:59 +02:00
|
|
|
devices = {
|
|
|
|
panacea.id =
|
|
|
|
"NF4SYEJ-RSGPDEF-CDEYC3A-JWZMKNC-KG4FVQP-CZ5HRFY-XM22BZD-N7B6VAH";
|
|
|
|
caravanserai.id =
|
2021-11-02 21:25:01 +01:00
|
|
|
"P6BJYCN-LWMB7HN-5JLNYM7-VHCG2S2-IC6YA3C-DOWMW7T-PX7GC3S-3BAZUAS";
|
2021-08-13 11:00:59 +02:00
|
|
|
};
|
|
|
|
folders = {
|
|
|
|
Documents = {
|
|
|
|
id = "wusdj-bfjkr";
|
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Documents";
|
|
|
|
devices = [ "panacea" "caravanserai" ];
|
2019-11-07 14:25:27 +01:00
|
|
|
};
|
2020-02-25 14:03:24 +01:00
|
|
|
|
2021-08-13 11:00:59 +02:00
|
|
|
Notes = {
|
|
|
|
id = "kafhz-bfmzm";
|
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Notes";
|
|
|
|
devices = [ "panacea" "caravanserai" ];
|
|
|
|
};
|
2020-02-25 14:03:24 +01:00
|
|
|
|
2021-08-13 11:00:59 +02:00
|
|
|
Music = {
|
|
|
|
id = "2aqt7-vpprc";
|
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Music";
|
|
|
|
devices = [ "panacea" "caravanserai" ];
|
|
|
|
};
|
2020-02-25 14:03:24 +01:00
|
|
|
|
2021-08-13 11:00:59 +02:00
|
|
|
Photos = {
|
|
|
|
id = "mjibc-ustcg";
|
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Photos";
|
|
|
|
devices = [ "panacea" "caravanserai" ];
|
|
|
|
};
|
2020-02-25 14:03:24 +01:00
|
|
|
|
2021-08-13 11:00:59 +02:00
|
|
|
Projects = {
|
|
|
|
id = "cjhmu-avy9v";
|
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Projects";
|
|
|
|
devices = [ "panacea" ];
|
|
|
|
};
|
2020-12-22 03:45:30 +01:00
|
|
|
|
2021-08-13 11:00:59 +02:00
|
|
|
Phone = {
|
2021-11-02 21:25:01 +01:00
|
|
|
id = "m2007j20cg_vc7r-photos";
|
2021-08-13 11:00:59 +02:00
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Photos/Phone";
|
|
|
|
devices = [ "panacea" "caravanserai" ];
|
|
|
|
};
|
2020-12-22 03:45:30 +01:00
|
|
|
|
2021-08-13 11:00:59 +02:00
|
|
|
Files = {
|
|
|
|
id = "tsk52-u6rbk";
|
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Files";
|
|
|
|
devices = [ "panacea" "caravanserai" ];
|
2019-11-08 01:05:42 +01:00
|
|
|
};
|
2022-05-27 16:58:44 +02:00
|
|
|
|
|
|
|
Phone-screenshots = {
|
|
|
|
id = "pp70r-pbr70";
|
|
|
|
type = "receiveonly";
|
|
|
|
path = "/vault/syncthing/Photos/Phone-screenshots";
|
|
|
|
devices = [ "panacea" "caravanserai" ];
|
|
|
|
};
|
2019-11-07 14:25:27 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable Radicale
|
|
|
|
services.radicale = {
|
|
|
|
enable = true;
|
2021-05-17 09:56:44 +02:00
|
|
|
settings = {
|
|
|
|
server.hosts = [ "127.0.0.1:5232" ];
|
|
|
|
auth = {
|
|
|
|
type = "htpasswd";
|
|
|
|
htpasswd_filename = "/vault/radicale/users";
|
|
|
|
htpasswd_encryption = "md5";
|
|
|
|
delay = 1;
|
|
|
|
};
|
|
|
|
storage.filesystem_folder = "/vault/radicale/collections";
|
|
|
|
};
|
2019-11-07 14:25:27 +01:00
|
|
|
};
|
|
|
|
|
2020-12-12 16:03:21 +01:00
|
|
|
# ZFS automatic snapshots
|
|
|
|
services.zfs.autoSnapshot = {
|
2020-06-20 02:00:59 +02:00
|
|
|
enable = true;
|
2020-12-12 16:03:21 +01:00
|
|
|
frequent = 4;
|
|
|
|
hourly = 24;
|
|
|
|
daily = 7;
|
|
|
|
weekly = 4;
|
|
|
|
monthly = 12;
|
2020-06-20 02:00:59 +02:00
|
|
|
};
|
|
|
|
|
2019-11-07 14:25:27 +01:00
|
|
|
}
|