Syncthing

From NixOS Wiki
Revision as of 11:53, 7 October 2020 by imported>Thu (Add link to the Getting Started guide.)

Syncthing is available as a standalone package:

nix-env -iA nixos.syncthing

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 values ("syncthing" for the user, "/var/lib/syncthing" for the dir) you won't be able to access the files:

services = {
    syncthing = {
        enable = true;
        user = "myusername";
        dataDir = "/home/myusername/Documents";
        configDir = "/home/myusername/Documents/.config/syncthing";
    };
};

You can confirm Syncthing runs by visiting http://127.0.0.1:8384/ and follow the offical Getting Started guide: https://docs.syncthing.net/intro/getting-started.html

home-manager service

https://github.com/nix-community/home-manager/blob/master/modules/services/syncthing.nix