Auto load syncthing at startup
This commit is contained in:
parent
4689a4f69c
commit
699cbd620e
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue