From e1eef0c5b6764ec0b9d778b02d3b31488d3c8739 Mon Sep 17 00:00:00 2001 From: KoenDR06 Date: Wed, 22 Oct 2025 19:16:22 +0200 Subject: [PATCH] add Programming to Syncthing --- modules/network/syncthing.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/network/syncthing.nix b/modules/network/syncthing.nix index ae1f5af..b2a0580 100644 --- a/modules/network/syncthing.nix +++ b/modules/network/syncthing.nix @@ -5,6 +5,7 @@ }: let inherit (lib) mkEnableOption mkIf; cfg = config.horseman.network.syncthing; + username = config.horseman.username; in { options = { horseman.network.syncthing = { @@ -15,10 +16,10 @@ in { config = mkIf cfg.enable { services.syncthing = { enable = true; - user = "horseman"; + user = username; group = "users"; - dataDir = "/home/horseman"; - configDir = "/home/horseman/.config/syncthing"; + dataDir = "/home/${username}"; + configDir = "/home/${username}/.config/syncthing"; overrideDevices = true; # overrideFolders = true; settings = { @@ -45,7 +46,12 @@ in { folders = { "Documents" = { id = "documentFolder"; - path = "/home/horseman/Documents"; + path = "/home/${username}/Documents"; + devices = ["luna" "terra" "solis"]; + }; + "Programming" = { + id = "programmingFolder"; + path = "/home/${username}/Programming"; devices = ["luna" "terra" "solis"]; }; };