{ config, pkgs, ... }:

{
  # Enable Syncthing
  services.syncthing = {
    enable = true;
    #openDefaultPorts = true;
    guiAddress = "127.0.0.1:8384";
    user = "zulumann";
    group = "users";
    configDir = "/home/zulumann/.config/syncthing";
    dataDir = "/home/zulumann";
    overrideDevices = false;
    overrideFolders = false;
    settings.devices = {
      "Syncthing-Server" = { id = "KB55MRV-5QIL3A3-DSTAQJL-EZ3S3CV-KDIU26M-NM5UHBY-B2ZTSDK-D4QC7QU"; };
    };

  settings.versioning = {
    type = "staggered";
    params = {
      cleanInterval = "3600"; # 1 hour in seconds
      maxAge = "15552000"; # 180 days in seconds
      };
    };
  };

  services.syncthing.settings.gui = {
    user = "zulumann";
    password = "he_lu@1970";
  };

  environment.systemPackages = with pkgs; [
    qsyncthingtray
  ];
}    
