From 8f5b01498e19dafd96065564fd4d3b54d2084614 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Mon, 31 Mar 2025 10:53:18 -0700 Subject: [PATCH] [syncthing] Sets up relay on MCP --- home-manager/features/notes.nix | 8 +++++++- system/hosts/mcp/configuration.nix | 11 ++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/home-manager/features/notes.nix b/home-manager/features/notes.nix index 295a622..cc4fc12 100644 --- a/home-manager/features/notes.nix +++ b/home-manager/features/notes.nix @@ -6,9 +6,15 @@ enable = lib.mkDefault true; }; settings = { + folders.Notes = { + path = "~/Documents/Notes"; + }; options = { localAnnounceEnabled = false; - relaysEnabled = false; + relaysEnabled = true; + globalAnnounceEnabled = true; + globalAnnounceServer = "relay://mcp:22067"; + listenAddress = "relay://mcp:22067"; }; }; }; diff --git a/system/hosts/mcp/configuration.nix b/system/hosts/mcp/configuration.nix index 29493fa..7cbc873 100644 --- a/system/hosts/mcp/configuration.nix +++ b/system/hosts/mcp/configuration.nix @@ -111,9 +111,18 @@ }; }; + ### Syncthing relay + # So I don't have to use public relays + services.syncthing.relay = { + enable = true; + pools = [ ]; + }; + ### Firewall # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; + networking.firewall.allowedTCPPorts = [ + 22067 # Syncthing relay + ]; # networking.firewall.allowedUDPPorts = [ ... ]; # Or disable the firewall altogether. # networking.firewall.enable = false;