mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 10:05:13 -05:00
refactor: cleaned up nixos and home dirs
This commit is contained in:
parent
824a91d405
commit
e596e1c1b3
582 changed files with 2 additions and 22 deletions
64
modules/nixos/services/syncthing/default.nix
Executable file
64
modules/nixos/services/syncthing/default.nix
Executable file
|
@ -0,0 +1,64 @@
|
|||
{ 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;
|
||||
};
|
||||
${tablet.name} = {
|
||||
autoAcceptFolders = true;
|
||||
name = tablet.name;
|
||||
addresses = [
|
||||
"tcp://${tablet.ip.address0}:${toString service.ports.port2}"
|
||||
];
|
||||
id = tablet.sync.address0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
service.ports.port0
|
||||
service.ports.port1
|
||||
service.ports.port2
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue