47 lines
967 B
Nix
47 lines
967 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;
|
|
|
|
cert = config.age.secrets.syncthing-cert.path;
|
|
key = config.age.secrets.syncthing-key.path;
|
|
|
|
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 = { };
|
|
};
|
|
};
|
|
|
|
age = {
|
|
secrets = {
|
|
"syncthing-cert".file = ../../../../secrets/manatee/syncthing-cert.age;
|
|
"syncthing-key".file = ../../../../secrets/manatee/syncthing-key.age;
|
|
};
|
|
};
|
|
};
|
|
}
|