Syncthing: Difference between revisions

imported>Sciamp
m Update devices configuration option to use the new renamed one
imported>Fauxmight
m Declarative configuration: services.syncthing.folders -> services.syncthing.settings.folders
Line 31: Line 31:
     overrideDevices = true;    # overrides any devices added or deleted through the WebUI
     overrideDevices = true;    # overrides any devices added or deleted through the WebUI
     overrideFolders = true;    # overrides any folders added or deleted through the WebUI
     overrideFolders = true;    # overrides any folders added or deleted through the WebUI
     settings.devices = {
     settings = {
      "device1" = { id = "DEVICE-ID-GOES-HERE"; };
      devices = {
      "device2" = { id = "DEVICE-ID-GOES-HERE"; };
        "device1" = { id = "DEVICE-ID-GOES-HERE"; };
    };
        "device2" = { id = "DEVICE-ID-GOES-HERE"; };
    folders = {
      "Documents" = {        # Name of folder in Syncthing, also the folder ID
        path = "/home/myusername/Documents";    # Which folder to add to Syncthing
        devices = [ "device1" "device2" ];      # Which devices to share the folder with
       };
       };
       "Example" = {
       folders = {
        path = "/home/myusername/Example";
        "Documents" = {        # Name of folder in Syncthing, also the folder ID
        devices = [ "device1" ];
          path = "/home/myusername/Documents";    # Which folder to add to Syncthing
        ignorePerms = false;     # By default, Syncthing doesn't sync file permissions. This line enables it for this folder.
          devices = [ "device1" "device2" ];      # Which devices to share the folder with
        };
        "Example" = {
          path = "/home/myusername/Example";
          devices = [ "device1" ];
          ignorePerms = false; # By default, Syncthing doesn't sync file permissions. This line enables it for this folder.
        };
       };
       };
     };
     };