{ pkgs, config, lib, ... }: let cfg = config.modules.system.syncthing; in { options.modules.system.syncthing = { enable = lib.mkEnableOption "enables syncthing"; }; config = lib.mkIf cfg.enable { services.syncthing = { enable = true; user = "blake"; group = "blake"; dataDir = "/home/blake/.local/state/syncthing"; configDir = "/home/blake/.config/syncthing"; # webui guiAddress = "0.0.0.0:2222"; openDefaultPorts = true; }; }; }