diff --git a/machines/fuuko/configuration.nix b/machines/fuuko/configuration.nix index 75ffefe..a831cfc 100644 --- a/machines/fuuko/configuration.nix +++ b/machines/fuuko/configuration.nix @@ -48,6 +48,8 @@ networking.firewall.allowedTCPPorts = [ 80 443 ]; systemd.services.nginx.serviceConfig.SupplementaryGroups = lib.singleton "keys"; + services.syncthing.enable = true; + networking.hostName = "fuuko"; system.stateVersion = "20.09"; diff --git a/modules/default.nix b/modules/default.nix index 95615ed..c0074bf 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -44,6 +44,7 @@ ./restic ./secrets.nix ./ssh.nix + ./syncthing.nix ./tools.nix ./udev.nix ./unfree.nix diff --git a/modules/syncthing.nix b/modules/syncthing.nix new file mode 100644 index 0000000..47d58f8 --- /dev/null +++ b/modules/syncthing.nix @@ -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 can’t be + # easily generated from the configuration + }; +}