7a06bf52eb
This reverts commit adbaa9ebbc
.
Turns out, mbsync adds hostname to every mail file. And that makes
things pretty awkward, often syncthing same mail file multiple times.
Since I do not expect to have hermes and phoebe running simultaneously
most of the time, I think it is fine to sync mail to both independently
of each other.
54 lines
1.5 KiB
Nix
54 lines
1.5 KiB
Nix
{ ... }:
|
|
# TODO:
|
|
# - Setup certificates and keys declaratively? This will be a real possibility of depending on my SSH key for a whole lotta stuff. Perhaps keep that for future
|
|
{
|
|
imports = [
|
|
../../modules/common-syncthing.nix
|
|
];
|
|
|
|
# Open syncthing port, but only for local network
|
|
networking.firewall.extraCommands = ''
|
|
iptables -A nixos-fw -p tcp --source 192.168.0.0/24 --dport 8384:8384 -j nixos-fw-accept
|
|
iptables -A nixos-fw -p udp --source 192.168.0.0/24 --dport 8384:8384 -j nixos-fw-accept
|
|
'';
|
|
|
|
services.syncthing = {
|
|
# Enable Syncthing GUI access from network
|
|
# WARNING: This will open syncthing GUI to whole internet.
|
|
# Always use this in combination with above networing config to limit the access from outside LAN
|
|
guiAddress = "0.0.0.0:8384";
|
|
|
|
settings = {
|
|
folders = {
|
|
Keepass = {
|
|
devices = [ "hermes" "Childish Tycoon" "bebop" ];
|
|
type = "sendreceive";
|
|
versioning = {
|
|
type = "simple";
|
|
params.keep = "10";
|
|
};
|
|
};
|
|
|
|
Syncthing = {
|
|
devices = [ "hermes" "Childish Tycoon" "bebop" ];
|
|
type = "sendreceive";
|
|
versioning = {
|
|
type = "simple";
|
|
params.keep = "3";
|
|
};
|
|
};
|
|
|
|
org = {
|
|
devices = [ "hermes" "Childish Tycoon" "bebop" ];
|
|
type = "sendreceive";
|
|
};
|
|
|
|
Music = {
|
|
devices = [ "hermes" "Childish Tycoon" "bebop" ];
|
|
type = "sendreceive";
|
|
fsWatcherEnabled = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|