syncthing: Init

This commit is contained in:
Simon Bruder 2022-07-01 08:51:54 +02:00
parent dc49c0bb69
commit 22d017999f
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
3 changed files with 29 additions and 0 deletions

View file

@ -48,6 +48,8 @@
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [ 80 443 ];
systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys"; systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys";
services.syncthing.enable = true;
networking.hostName = "fuuko"; networking.hostName = "fuuko";
system.stateVersion = "20.09"; system.stateVersion = "20.09";

View file

@ -44,6 +44,7 @@
./restic ./restic
./secrets.nix ./secrets.nix
./ssh.nix ./ssh.nix
./syncthing.nix
./tools.nix ./tools.nix
./udev.nix ./udev.nix
./unfree.nix ./unfree.nix

26
modules/syncthing.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, lib, ... }:
{
services.syncthing = {
enable = lib.mkDefault config.sbruder.gui.enable;
guiAddress = "${config.sbruder.wireguard.home.address}:8384";
openDefaultPorts = true;
user = "simon";
dataDir = "/home/simon";
overrideDevices = false;
devices = {
fuuko = {
addresses = [
"tcp://fuuko.home.sbruder.de:22000"
];
id = "Z2OO5LK-N3UVCRD-QKVKLZ3-3LRXUOH-JENBAKQ-M647E3L-7FL6LIE-74GGHQF";
};
};
overrideFolders = false;
# folders are not managed statically, because the list of devices cant be
# easily generated from the configuration
};
}