nas: add syncthing module
This commit is contained in:
parent
234904c08f
commit
a9ab9e64ba
42
modules/services/nas/syncthing.nix
Normal file
42
modules/services/nas/syncthing.nix
Normal file
@ -0,0 +1,42 @@
|
||||
#
|
||||
# System notifications
|
||||
#
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
group = "users";
|
||||
user = "kabbone";
|
||||
dataDir = "/home/${config.services.syncthing.user}/Sync";
|
||||
configDir = "/home/${config.services.syncthing.user}/.config/syncthing";
|
||||
overrideDevices = true; # overrides any devices added or deleted through the WebUI
|
||||
overrideFolders = true; # overrides any folders added or deleted through the WebUI
|
||||
openDefaultPorts = true;
|
||||
settings = {
|
||||
devices = {
|
||||
"hades" = { id = "DEVICE-ID-GOES-HERE"; };
|
||||
"lifebook" = { id = "DEVICE-ID-GOES-HERE"; };
|
||||
};
|
||||
folders = {
|
||||
"Sync" = { # Name of folder in Syncthing, also the folder ID
|
||||
path = "/home/${config.services.syncthing.user}/Sync"; # Which folder to add to Syncthing
|
||||
devices = [ "hades" "lifebook" ]; # Which devices to share the folder with
|
||||
ignorePerms = false; # By default, Syncthing doesn't sync file permissions. This line enables it for this folder.
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
virtualHosts = {
|
||||
"syncthing.home.opel-online.de" = {
|
||||
useACMEHost = "home.opel-online.de";
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "${toString config.services.syncthing.guiAddress}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user