diff --git a/machines/gustave/default.nix b/machines/gustave/default.nix index 9df1198..7dc02a7 100644 --- a/machines/gustave/default.nix +++ b/machines/gustave/default.nix @@ -17,6 +17,7 @@ ./plausible.nix ./nextcloud.nix ./glance.nix + ./syncthing.nix ]; machine.meta = { diff --git a/machines/gustave/syncthing.nix b/machines/gustave/syncthing.nix new file mode 100644 index 0000000..30b4bc1 --- /dev/null +++ b/machines/gustave/syncthing.nix @@ -0,0 +1,32 @@ +{ config, ... }: +{ + services.syncthing = { + enable = true; + user = "julien"; + group = "users"; + overrideDevices = true; + overrideFolders = true; + + settings.options = { + urAccepted = -1; + listenAddresses = [ "tcp://${config.machine.meta.ips.vpn.ipv4}" ]; + }; + + devices = { + "fischer" = { + id = "XEPZZIP-GX73OKE-KNGZA47-XWWGI5G-LNXPU57-BMLXK5M-VNGS5UQ-ZFIZSAK"; + }; + }; + folders = { + "dev" = { + path = "/home/julien/dev"; + devices = [ + "fischer" + ]; + }; + }; + }; + + systemd.services.syncthing.serviceConfig.StateDirectory = "syncthing"; + systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; +}