From a6864f69ef79cfc49472d7563eecd5b8eec6a645 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Mon, 20 Jan 2025 22:28:28 +0100 Subject: [PATCH 1/3] feat(fischer): init syncthing --- machines/fischer/default.nix | 7 ++++--- machines/fischer/syncthing.nix | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 machines/fischer/syncthing.nix diff --git a/machines/fischer/default.nix b/machines/fischer/default.nix index 693f3fe..5e31427 100644 --- a/machines/fischer/default.nix +++ b/machines/fischer/default.nix @@ -9,6 +9,7 @@ imports = [ ./hardware.nix ./home-julien.nix + ./syncthing.nix ]; machine.meta = { @@ -86,9 +87,9 @@ # Use the NVidia open source kernel module (not to be confused with the # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus + # Support is limited to the Turing and later architectures. Full list of + # supported GPUs is at: + # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus # Only available from driver 515.43.04+ # Do not disable this unless your GPU is unsupported or if you have a good reason to. open = true; diff --git a/machines/fischer/syncthing.nix b/machines/fischer/syncthing.nix new file mode 100644 index 0000000..801c2dd --- /dev/null +++ b/machines/fischer/syncthing.nix @@ -0,0 +1,36 @@ +{ 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 = { + "gustave" = { + id = "GVKWXUD-UVEXZMZ-YCZ7S6X-R47ZWG4-AJQ2XAQ-B3HUDTK-NZTBJ2E-EFXGAQX"; + addresses = [ + "tcp://gustave.luj:22000" + ]; + }; + + }; + folders = { + "dev" = { + path = "/home/julien/dev"; + devices = [ + "gustave" + ]; + }; + }; + }; + + systemd.services.syncthing.serviceConfig.StateDirectory = "syncthing"; + systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; +} From 61f1aa3f9cf1656a9a48ee35fdc48a3023c7f8f6 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Mon, 20 Jan 2025 23:11:07 +0100 Subject: [PATCH 2/3] chore: update gustave id --- machines/fischer/syncthing.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machines/fischer/syncthing.nix b/machines/fischer/syncthing.nix index 801c2dd..b220bec 100644 --- a/machines/fischer/syncthing.nix +++ b/machines/fischer/syncthing.nix @@ -14,7 +14,7 @@ devices = { "gustave" = { - id = "GVKWXUD-UVEXZMZ-YCZ7S6X-R47ZWG4-AJQ2XAQ-B3HUDTK-NZTBJ2E-EFXGAQX"; + id = "6APF3EP-TIV7ZBK-5WB5SA4-Y2K37CR-AMIB2TM-6T2VORK-UYNQO2X-TO6V2QH"; addresses = [ "tcp://gustave.luj:22000" ]; From 74921ea499619d3b6d0ace758910ccfd7a8b29a3 Mon Sep 17 00:00:00 2001 From: Julien Malka Date: Mon, 20 Jan 2025 23:37:22 +0100 Subject: [PATCH 3/3] chore: syncthing changer --- machines/fischer/syncthing.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/machines/fischer/syncthing.nix b/machines/fischer/syncthing.nix index b220bec..5177bb6 100644 --- a/machines/fischer/syncthing.nix +++ b/machines/fischer/syncthing.nix @@ -20,12 +20,20 @@ ]; }; + "gallifrey" = { + id = "P3BTFAX-4MCSFQB-C5R5YBP-YGMJ6FU-OKJN4QG-MJ2BV6Y-YB4U7VL-3GFSTAM"; + addresses = [ + "tcp://gallifrey.luj:22000" + ]; + }; + }; folders = { "dev" = { path = "/home/julien/dev"; devices = [ "gustave" + "gallifrey" ]; }; };