From 52dc53694f165926394eeb372abe0fc441e11f45 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 3 Aug 2023 22:10:40 -0600 Subject: [PATCH] [NixOS] Looks like you have to explicitly share to each device for syncthings --- nixos/syncthing.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nixos/syncthing.nix b/nixos/syncthing.nix index f9b5512e..1fd40a0d 100644 --- a/nixos/syncthing.nix +++ b/nixos/syncthing.nix @@ -1,4 +1,12 @@ { pkgs, ... }: +let + devices = { + ryzen-shine = { id = "IYCR3JH-BDZ4N3F-ZBUETYR-4N2UILK-FAEJJ5B-YUYMZQ3-YN63E5T-I2EHCAK"; }; + biskcomp = { id = "63SZFEC-AVA7MAL-MRJCZXN-3J4MKY6-52CK37Q-EQDN27P-7LOTYFX-UTL7YA3"; }; + nixquick = { id = "6OAGJ3J-3P3R33R-ICHXDWX-IDDCUU7-ESN3Y65-2OGZMWL-R647V7N-4TA6IQM"; }; + }; + allDevices = builtins.attrNames devices; +in { system.activationScripts.syncthingPermissions = { text = '' @@ -10,16 +18,13 @@ services.syncthing = { enable = true; settings = { + inherit devices; folders = { sync = { path = "~/sync"; + devices = allDevices; }; }; - devices = { - ryzen-shine = { id = "IYCR3JH-BDZ4N3F-ZBUETYR-4N2UILK-FAEJJ5B-YUYMZQ3-YN63E5T-I2EHCAK"; }; - biskcomp = { id = "63SZFEC-AVA7MAL-MRJCZXN-3J4MKY6-52CK37Q-EQDN27P-7LOTYFX-UTL7YA3"; }; - nixquick = { id = "6OAGJ3J-3P3R33R-ICHXDWX-IDDCUU7-ESN3Y65-2OGZMWL-R647V7N-4TA6IQM"; }; - }; }; }; }