mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-06-16 18:15:13 -05:00
feat: init
This commit is contained in:
commit
c19ea940bd
320 changed files with 23845 additions and 0 deletions
54
nixos/modules/syncthing.nix
Executable file
54
nixos/modules/syncthing.nix
Executable file
|
@ -0,0 +1,54 @@
|
|||
{flake, ...}: let
|
||||
inherit (flake.config.system.device) nas phone tablet wildcard;
|
||||
inherit (flake.config.service.instance.syncthing) ports;
|
||||
localhost = wildcard.ip.address0;
|
||||
in {
|
||||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
overrideDevices = false;
|
||||
overrideFolders = false;
|
||||
openDefaultPorts = true;
|
||||
systemService = true;
|
||||
guiAddress = "${localhost}:${toString ports.port0}";
|
||||
settings = {
|
||||
devices = {
|
||||
${nas.name} = {
|
||||
autoAcceptFolders = true;
|
||||
name = nas.name;
|
||||
addresses = [
|
||||
"tcp://${nas.ip.address0}:${toString ports.port2}"
|
||||
];
|
||||
id = nas.sync;
|
||||
};
|
||||
${phone.name} = {
|
||||
autoAcceptFolders = true;
|
||||
name = phone.name;
|
||||
addresses = [
|
||||
"tcp://${phone.ip.address0}:${toString ports.port2}"
|
||||
];
|
||||
id = phone.sync;
|
||||
};
|
||||
${tablet.name} = {
|
||||
autoAcceptFolders = true;
|
||||
name = tablet.name;
|
||||
addresses = [
|
||||
"tcp://${tablet.ip.address0}:${toString ports.port2}"
|
||||
];
|
||||
id = tablet.sync;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
ports.port0
|
||||
ports.port1
|
||||
ports.port2
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue