diff options
Diffstat (limited to 'modules/services/syncthing')
-rw-r--r-- | modules/services/syncthing/default.nix | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/modules/services/syncthing/default.nix b/modules/services/syncthing/default.nix index 3b6f34f..bbd4fb9 100644 --- a/modules/services/syncthing/default.nix +++ b/modules/services/syncthing/default.nix @@ -1,11 +1,17 @@ { config, pkgs, lib, ... }: let cfg = config.my.services.syncthing; in { - services.syncthing = { - enable = true; - openDefaultPorts = true; - user = config.users.users.fcuny; - group = "users"; - dataDir = "${config.users.users.fcuny.home}/.syncthing"; + options.my.services.syncthing = with lib; { + enable = mkEnableOption "syncthing service"; + }; + + config = lib.mkIf cfg.enable { + services.syncthing = { + enable = true; + openDefaultPorts = true; + user = users.users.fcuny; + group = "users"; + dataDir = "${users.users.fcuny.home}/.syncthing"; + }; }; } |