syncthing server: change data dirs

This commit is contained in:
Daniel Langbein 2024-01-13 12:59:37 +01:00
parent 9ff9b59ec5
commit 9c876d6cc2
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002

View File

@ -8,9 +8,22 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
# Create user/group to be used by services.syncthing.user/group setting.
users.users."www-data" = {
group = "www-data";
uid = 82;
};
users.groups."www-data".gid = 82;
services = { services = {
syncthing = { syncthing = {
enable = true; enable = true;
# Optionally change user and group.
# This can be useful if your data directories shall belong to a different user/group.
user = "82"; # Default: syncthing
group = "82"; # Default: syncthing
# Whether to open the default ports in the firewall: TCP/UDP 22000 for transfers and UDP 21027 for discovery. # Whether to open the default ports in the firewall: TCP/UDP 22000 for transfers and UDP 21027 for discovery.
# With this enabled, the connection type of other syncthing clients in the same WiFi/LAN is "TCP LAN" and not "WAN Relay". # With this enabled, the connection type of other syncthing clients in the same WiFi/LAN is "TCP LAN" and not "WAN Relay".
openDefaultPorts = true; openDefaultPorts = true;
@ -28,13 +41,13 @@
# Name of folder in Syncthing, also the folder ID. # Name of folder in Syncthing, also the folder ID.
"Notes" = { "Notes" = {
# Path to shared folder. # Path to shared folder.
path = "/mnt/data/syncthing/notes"; path = "/mnt/data/jc-data/cloud.privacy1st.de/files_ncp/Notes";
# Which devices to share the folder with. # Which devices to share the folder with.
devices = [ "yodaTux" "yodaTab" "yodaEnchilada" "yodaCheeseburger" ]; devices = [ "yodaTux" "yodaTab" "yodaEnchilada" "yodaCheeseburger" ];
}; };
# Obsidian folder of Susan. # Obsidian folder of Susan.
"Obsidian" = { "Obsidian" = {
path = "/mnt/data/syncthing/Obsidian"; path = "/mnt/data/jc-data/cloud.privacy1st.de/files_susan/Obsidian";
devices = [ "susanLaptop" "susanHandy" ]; devices = [ "susanLaptop" "susanHandy" ];
}; };
}; };