37 lines
657 B
Nix
37 lines
657 B
Nix
{ lib, config, ... }:
|
|
let
|
|
enabled = config.mod.syncthing.enable;
|
|
in
|
|
{
|
|
options = {
|
|
mod.syncthing = {
|
|
enable = lib.mkEnableOption "Enable syncthing module";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf enabled {
|
|
services.syncthing = {
|
|
enable = true;
|
|
|
|
user = "storage";
|
|
group = "storage";
|
|
|
|
dataDir = "/mnt/sync/public";
|
|
|
|
guiAddress = "0.0.0.0:8384";
|
|
|
|
settings = {
|
|
gui = {
|
|
user = "syncthing";
|
|
password = "$2a$12$YBcqhl8AXpoLmIWikuMtkOQLcrPXKKj0xY/qy4hggWnfjeVLQ3Ct6";
|
|
insecureSkipHostcheck = false;
|
|
};
|
|
|
|
devices = { };
|
|
|
|
folders = { };
|
|
};
|
|
};
|
|
};
|
|
}
|