This repository has been archived on 2024-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
nixos/hosts/bebop/syncthing.nix
Payas Relekar 7a06bf52eb Revert "syncthing: add mail dir"
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.
2023-11-14 15:12:32 +05:30

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" "phoebe" ];
type = "receiveonly";
versioning = {
type = "simple";
params.keep = "10";
};
};
Syncthing = {
devices = [ "hermes" "Childish Tycoon" "phoebe" ];
type = "receiveonly";
versioning = {
type = "simple";
params.keep = "3";
};
};
org = {
devices = [ "hermes" "Childish Tycoon" "phoebe" ];
type = "receiveonly";
};
Music = {
devices = [ "hermes" "Childish Tycoon" "phoebe" ];
type = "receiveonly";
fsWatcherEnabled = true;
};
};
};
};
}