{ config, lib, pkgs, ... }:

let cfg = config.sydnix.users.msyds.syncthing;
in {
  options.sydnix.users.msyds.syncthing = {
    enable = lib.mkEnableOption "Syncthing";
  };

  config = lib.mkIf cfg.enable {
    sydnix.syncthing = {
      enable = true;
      includeDevices = [
        "sydpc"
        "deertopia"
      ];
      directories = {
        "org" = {
          path = "~/org";
          devices = [
            "deertopia"
            "sydpc"
          ];
          ignorePerms = true;
        };
      };
    };
  };
}
