thelio76: setup syncthing

This commit is contained in:
Alex 2024-08-15 14:48:50 -04:00
parent 1e1ef18bac
commit 02cf705482
2 changed files with 40 additions and 30 deletions

View File

@ -106,6 +106,12 @@
allowedTCPPorts = [
8081 # for expo android
];
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View File

@ -94,36 +94,40 @@
};
# Enable Syncthing
# service.syncthing = {
# enable = true;
# dataDir = "/home/alex";
# openDefaultPorts = true;
# configDir = "/home/alex/.config/syncthing";
# user = "alex";
# group = "users";
# guiAddress = "127.0.0.1:8384";
# declarative = {
# overrideDevices = true;
# overrideFolders = true;
# devices = {
# "laptop" = { id = "REALLY-LONG-LAPTOP-SYNCTHING-KEY-HERE"; };
# "coredns-server" = { id = "REALLY-LONG-COREDNS-SERVER-SYNCTHING-KEY-HERE"; };
# };
# folders = {
# "code" = {
# path = "/home/alex/code";
# devices = [ "laptop" ];
# versioning = {
# type = "staggered";
# params = {
# cleanInterval = "3600";
# maxAge = "15768000";
# };
# };
# };
# };
# };
# };
services.syncthing = {
enable = true;
dataDir = "/home/alex";
openDefaultPorts = true;
configDir = "/home/alex/.config/syncthing";
user = "alex";
group = "users";
guiAddress = "127.0.0.1:8384";
settings = {
overrideDevices = true;
overrideFolders = true;
devices = {
"atauno" = { id = "TXSURD2-XCKOLDG-DJ76OOK-JZXOE3Q-XXTNOIM-XR5LB2B-YWBV2ER-6KRFIQN"; };
"iphone15" = { id = "2K2CIOJ-KAV5QM6-BOYO6LX-HTK2BHM-4TFFST4-2VMSRBB-ZFML6VT-WOL5NAX"; };
"nixos76" = { id = "------"; };
"oneplus8t" = { id = "JIYG5UP-UHTO7KA-FDSIGQV-ON7YJXO-3JDAUNV-V6NJMCH-HWNOPBS-MXHHLAG"; };
"thelio76" = { id = "PZGASVL-XWQRFHI-MD2YC2I-UAJIR5B-KC34AA7-3BXN322-2IB7AO4-JPYIQAD"; };
};
folders = {
"vaults" = {
id = "bbqnm-caya2";
path = "/home/alex/Git/obsidian-vaults";
devices = [ "atauno" "iphone15" "oneplus8t" ];
versioning = {
type = "staggered";
params = {
cleanInterval = "3600";
maxAge = "15768000";
};
};
};
};
};
};
# Define a user account. Don't forget to set a password with passwd.
users.users.alex = {