From 699cbd620e8930ab5d90813e87ae7161ef576a3f Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Fri, 29 Aug 2025 07:37:29 +0200 Subject: [PATCH] Auto load syncthing at startup --- modules/syncthing.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/syncthing.nix b/modules/syncthing.nix index d3d878a..7161a09 100644 --- a/modules/syncthing.nix +++ b/modules/syncthing.nix @@ -1,10 +1,15 @@ { config, pkgs, lib, ... }: { - # Enable Syncthing service + # Enable Syncthing service with auto-start on macOS services.syncthing = { enable = true; # Don't enable tray on macOS as it requires additional setup tray.enable = false; }; + + # Override the launchd agent to add RunAtLoad on macOS + launchd.agents.syncthing = lib.mkIf (pkgs.stdenv.isDarwin && config.services.syncthing.enable) { + config.RunAtLoad = true; + }; } \ No newline at end of file