mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
![]() |
{ flake, ... }:
|
||
|
let
|
||
|
inherit (flake.config.machines.devices)
|
||
|
synology
|
||
|
phone
|
||
|
tablet
|
||
|
;
|
||
|
inherit (flake.config.services.instances)
|
||
|
syncthing
|
||
|
web
|
||
|
;
|
||
|
service = syncthing;
|
||
|
localhost = web.localhost.address0;
|
||
|
in
|
||
|
{
|
||
|
services = {
|
||
|
syncthing = {
|
||
|
enable = true;
|
||
|
overrideDevices = false;
|
||
|
overrideFolders = false;
|
||
|
openDefaultPorts = true;
|
||
|
systemService = true;
|
||
|
guiAddress = "${localhost}:${toString service.ports.port0}";
|
||
|
settings = {
|
||
|
devices = {
|
||
|
${synology.name} = {
|
||
|
autoAcceptFolders = true;
|
||
|
name = synology.name;
|
||
|
addresses = [
|
||
|
"tcp://${synology.ip.address0}:${toString service.ports.port2}"
|
||
|
];
|
||
|
id = synology.sync.address0;
|
||
|
};
|
||
|
${phone.name} = {
|
||
|
autoAcceptFolders = true;
|
||
|
name = phone.name;
|
||
|
addresses = [
|
||
|
"tcp://${phone.ip.address0}:${toString service.ports.port2}"
|
||
|
];
|
||
|
id = phone.sync.address0;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
|
||
|
networking = {
|
||
|
firewall = {
|
||
|
allowedTCPPorts = [
|
||
|
service.ports.port0
|
||
|
service.ports.port1
|
||
|
service.ports.port2
|
||
|
];
|
||
|
};
|
||
|
};
|
||
|
}
|