94 lines
2.1 KiB
Nix
94 lines
2.1 KiB
Nix
{ config, pkgs, lib, ... }: {
|
|
|
|
# Syncthing configuration
|
|
services.syncthing = {
|
|
enable = true;
|
|
openDefaultPorts = true;
|
|
guiAddress = "0.0.0.0:8384";
|
|
dataDir = "/vault/syncthing";
|
|
declarative = {
|
|
devices = {
|
|
panacea = {
|
|
id =
|
|
"UNZIABR-GEQ4AWT-XKFADLW-HW3SQ3Y-BEYZ56A-W530DLS-DXGQWKK-2QQ4RQ6";
|
|
};
|
|
dendrite = {
|
|
id =
|
|
"6KSGHNJ-NH4EZGP-X5HGV6B-OQ3ZFE6-WZQACOC-6WKPRGI-TTBRHJ5-U3R2AQ3";
|
|
};
|
|
};
|
|
folders = {
|
|
Documents = {
|
|
id = "wusdj-bfjkr";
|
|
type = "receiveonly";
|
|
path = "/vault/syncthing/Documents";
|
|
devices = [ "panacea" "dendrite" ];
|
|
};
|
|
|
|
Notes = {
|
|
id = "kafhz-bfmzm";
|
|
type = "receiveonly";
|
|
path = "/vault/syncthing/Notes";
|
|
devices = [ "panacea" "dendrite" ];
|
|
};
|
|
|
|
Music = {
|
|
id = "2aqt7-vpprc";
|
|
type = "receiveonly";
|
|
path = "/vault/syncthing/Music";
|
|
devices = [ "panacea" "dendrite" ];
|
|
};
|
|
|
|
Photos = {
|
|
id = "mjibc-ustcg";
|
|
type = "receiveonly";
|
|
path = "/vault/syncthing/Photos";
|
|
devices = [ "panacea" "dendrite" ];
|
|
};
|
|
|
|
Projects = {
|
|
id = "cjhmu-avy9v";
|
|
type = "receiveonly";
|
|
path = "/vault/syncthing/Projects";
|
|
devices = [ "panacea" ];
|
|
};
|
|
Phone = {
|
|
id = "m2007j20cg_288y-photos";
|
|
type = "receiveonly";
|
|
path = "/vault/syncthing/Photos/Phone";
|
|
devices = [ "panacea" "dendrite" ];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
# Enable Radicale
|
|
services.radicale = {
|
|
enable = true;
|
|
config = ''
|
|
[server]
|
|
hosts = 127.0.0.1:5232
|
|
max_connections = 20
|
|
max_content_length = 100000000
|
|
timeout = 30
|
|
|
|
[auth]
|
|
type = htpasswd
|
|
htpasswd_filename = /var/lib/radicale/users
|
|
htpasswd_encryption = plain
|
|
delay = 1
|
|
'';
|
|
};
|
|
|
|
# ZFS automatic snapshots
|
|
services.zfs.autoSnapshot = {
|
|
enable = true;
|
|
frequent = 4;
|
|
hourly = 24;
|
|
daily = 7;
|
|
weekly = 4;
|
|
monthly = 12;
|
|
};
|
|
|
|
}
|