Auto load syncthing at startup

This commit is contained in:
Yan Lin 2025-08-29 07:37:29 +02:00
parent 4689a4f69c
commit 699cbd620e

View file

@ -1,10 +1,15 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ {
# Enable Syncthing service # Enable Syncthing service with auto-start on macOS
services.syncthing = { services.syncthing = {
enable = true; enable = true;
# Don't enable tray on macOS as it requires additional setup # Don't enable tray on macOS as it requires additional setup
tray.enable = false; 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;
};
} }