{ config, lib, pkgs, ... }: { options = { syncthing.devices = lib.mkOption { default = { }; description = '' set syncthing devices ''; }; syncthing.folders = lib.mkOption { default = { }; description = '' set syncthing folders ''; }; }; config = { services = { syncthing = { enable = true; tray.enable = true; guiAddress = "0.0.0.0:8384"; settings = { devices = config.syncthing.devices; folders = config.syncthing.folders; }; overrideDevices = lib.mkIf (config.syncthing.devices == { }) false; overrideFolders = lib.mkIf (config.syncthing.folders == { }) false; }; }; }; }