syncthing?

This commit is contained in:
janis 2025-09-03 17:18:15 +02:00
parent bb2f9b96dd
commit bce366abdc
Signed by: janis
SSH key fingerprint: SHA256:bB1qbbqmDXZNT0KKD5c2Dfjg53JGhj7B3CFcLIzSqq8
3 changed files with 52 additions and 1 deletions

View file

@ -16,6 +16,7 @@ in {
./libinput.nix
./git-ssh.nix
./emacs.nix
./syncthing.nix
./development
];

41
home/syncthing.nix Normal file
View file

@ -0,0 +1,41 @@
{pkgs, ...}:
let
user = import ../data/user.nix {};
in {
services.syncthing = {
enable = true;
tray.enable = true;
guiAddress = "0.0.0.0:8384";
settings = {
gui = {
user = "admin";
password = "strongpassword";
};
devices = {
# "laptop" = {
# name = "laptop";
# id = "LAPTOPDEVICEID";
# };
"desktop" = {
name = "desktop";
id = "HQ6L2IU-V7YKP4H-NVKMCAQ-6PZ37SJ-ETTXY7Y-2PBH62A-5AJAGPN-OUT3YQW";
};
"nirgendwo" = {
name = "nirgendwo";
id = "UNHUVZP-7HO7R6J-EKSG2QT-CLCFQ7E-GD7AKA7-TMNZT3E-6M56VPS-AGDE5AA";
};
};
folders = {
"Shared" = {
id = "539nt-oefmc";
path = "~/Shared";
devices = [ "nirgendwo" "desktop" ];
};
};
};
};
}

View file

@ -98,7 +98,16 @@
};
};
};
firewall.enable = false;
firewall = {
enable = true;
# ssh: 22 TCP
# cups: 631 TCP
# syncthing:
# 22000 TCP and/or UDP for sync traffic
# 21027/UDP for discovery
allowedTCPPorts = [ 22 22000 631 ];
allowedUDPPorts = [ 22000 21027 ];
};
};
time.timeZone = "Europe/Amsterdam";