Syncthing: Difference between revisions

imported>Klaymore
Added section for declarative folder configuration
imported>Klaymore
m Comments for dataDir and configDir options
Line 3: Line 3:
  <nowiki>nix-env -iA nixos.syncthing</nowiki>
  <nowiki>nix-env -iA nixos.syncthing</nowiki>


It can also be enabled as a service. You'll typically want to configure the user and the path to the configuration directory, as with the default
It can also be enabled as a service. You'll typically want to configure the user and the path to the configuration directory, as with the defaultvalues ("syncthing" for the user, "/var/lib/syncthing" for the dir) you won't be able to access the files:
values ("syncthing" for the user, "/var/lib/syncthing" for the dir) you won't be able to access the files:


  <nowiki>
  <nowiki>
Line 11: Line 10:
         enable = true;
         enable = true;
         user = "myusername";
         user = "myusername";
         dataDir = "/home/myusername/Documents";
         dataDir = "/home/myusername/Documents";   # Default folder for new synced folders
         configDir = "/home/myusername/Documents/.config/syncthing";
         configDir = "/home/myusername/Documents/.config/syncthing";   # Folder for Syncthing's settings and keys
     };
     };
};
};