Syncthing: Difference between revisions
imported>Klaymore m Typo fix |
imported>Klaymore Added syntax highlighting |
||
| Line 1: | Line 1: | ||
Syncthing is available as a standalone package: | Syncthing is available as a standalone package: <code>nix-env -iA nixos.syncthing</code> | ||
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: | 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: | ||
<syntaxHighlight lang="nix"> | |||
services = { | services = { | ||
syncthing = { | syncthing = { | ||
| Line 14: | Line 13: | ||
}; | }; | ||
}; | }; | ||
</ | </syntaxHighlight> | ||
You can confirm Syncthing runs by visiting http://127.0.0.1:8384/ and follow the official Getting Started guide: https://docs.syncthing.net/intro/getting-started.html | You can confirm Syncthing runs by visiting http://127.0.0.1:8384/ and follow the official Getting Started guide: https://docs.syncthing.net/intro/getting-started.html | ||
| Line 25: | Line 24: | ||
(Note: Before NixOS 21.11, declarative configuration was done in the <code>services.syncthing.declarative</code> option, such as <code>services.syncthing.declarative.folders = {};</code>) | (Note: Before NixOS 21.11, declarative configuration was done in the <code>services.syncthing.declarative</code> option, such as <code>services.syncthing.declarative.folders = {};</code>) | ||
<syntaxHighlight lang="nix"> | |||
services = { | services = { | ||
syncthing = { | syncthing = { | ||
| Line 48: | Line 47: | ||
}; | }; | ||
}; | }; | ||
</ | </syntaxHighlight> | ||