From a89d4aa586100bec616d44b428f1ac4547801f9a Mon Sep 17 00:00:00 2001 From: serenity-F Date: Thu, 9 Jan 2025 13:06:07 +1000 Subject: [PATCH] deduped some syncthing options --- core/modules/default.nix | 1 + {hosts/hades => core}/modules/sync.nix | 0 hosts/hades/modules/default.nix | 1 - hosts/hades/modules/network.nix | 47 +++++++++-------- hosts/iso/modules/network.nix | 72 ++++++++------------------ hosts/orcus/modules/network.nix | 72 ++++++++------------------ hosts/persephone/modules/network.nix | 72 ++++++++------------------ 7 files changed, 94 insertions(+), 171 deletions(-) rename {hosts/hades => core}/modules/sync.nix (100%) diff --git a/core/modules/default.nix b/core/modules/default.nix index b2e4b21..a01d7fa 100755 --- a/core/modules/default.nix +++ b/core/modules/default.nix @@ -5,6 +5,7 @@ imports = [ ## Semi-modularised config + ./sync.nix # syncthing settings ./misc.nix # stuff that doesn't work in `/home` :( ./audio.nix # musnix and ... audio ... config ./display.nix # declarations for display management diff --git a/hosts/hades/modules/sync.nix b/core/modules/sync.nix similarity index 100% rename from hosts/hades/modules/sync.nix rename to core/modules/sync.nix diff --git a/hosts/hades/modules/default.nix b/hosts/hades/modules/default.nix index 0ea6618..074dd88 100755 --- a/hosts/hades/modules/default.nix +++ b/hosts/hades/modules/default.nix @@ -7,7 +7,6 @@ ## Selected host modules for import ./hardware.nix # hardware configuration ./network.nix # network configuration - ./sync.nix # syncthing & gitwatch ./zfs.nix # zfs configuration ## Additional core modules to import diff --git a/hosts/hades/modules/network.nix b/hosts/hades/modules/network.nix index fb02e0a..da34623 100755 --- a/hosts/hades/modules/network.nix +++ b/hosts/hades/modules/network.nix @@ -15,37 +15,37 @@ }; #nameservers = [ - #"1.1.1.1" + #"1.1.1.1" #]; #proxy = { - #default = "https://user:password@proxy:port/"; - #noProxy = "127.0.0.1, localhost, internal.domain"; + #default = "https://user:password@proxy:port/"; + #noProxy = "127.0.0.1, localhost, internal.domain"; #}; - + }; ## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy networking.firewall = { enable = true; - #checkReversePath = "loose"; - #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; - #allowedUDPPortRanges = allowedTCPPortRanges; - #interfaces."DEVICENAME".allowedTCPPorts = [ - #22999 - #] - allowedTCPPorts = [ - 2234 # soulseek/nicotine-plus - 8384 # syncthing - #21027 - #25565 - ]; - allowedUDPPorts = [ - #22000 - #21027 - #41641 - #51820 - ]; + #checkReversePath = "loose"; + #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; + #allowedUDPPortRanges = allowedTCPPortRanges; + #interfaces."DEVICENAME".allowedTCPPorts = [ + #22999 + #] + allowedTCPPorts = [ + 2234 # soulseek/nicotine-plus + 8384 # syncthing + #21027 + #25565 + ]; + allowedUDPPorts = [ + #22000 + #21027 + #41641 + #51820 + ]; }; services.dnscrypt-proxy2 = { @@ -60,7 +60,8 @@ "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" ]; cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + minisign_key = + "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; }; # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md diff --git a/hosts/iso/modules/network.nix b/hosts/iso/modules/network.nix index 57a9871..f8774d3 100755 --- a/hosts/iso/modules/network.nix +++ b/hosts/iso/modules/network.nix @@ -15,36 +15,36 @@ }; #nameservers = [ - #"1.1.1.1" + #"1.1.1.1" #]; #proxy = { - #default = "https://user:password@proxy:port/"; - #noProxy = "127.0.0.1, localhost, internal.domain"; + #default = "https://user:password@proxy:port/"; + #noProxy = "127.0.0.1, localhost, internal.domain"; #}; - + }; ## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy networking.firewall = { enable = true; - #checkReversePath = "loose"; - #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; - #allowedUDPPortRanges = allowedTCPPortRanges; - #interfaces."DEVICENAME".allowedTCPPorts = [ - #22999 - #] - #allowedTCPPorts = [ - #22000 - #21027 - #25565 - #]; - #allowedUDPPorts = [ - #22000 - #21027 - #41641 - #51820 - #]; + #checkReversePath = "loose"; + #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; + #allowedUDPPortRanges = allowedTCPPortRanges; + #interfaces."DEVICENAME".allowedTCPPorts = [ + #22999 + #] + #allowedTCPPorts = [ + #22000 + #21027 + #25565 + #]; + #allowedUDPPorts = [ + #22000 + #21027 + #41641 + #51820 + #]; }; services.dnscrypt-proxy2 = { @@ -59,7 +59,8 @@ "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" ]; cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + minisign_key = + "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; }; # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md @@ -78,31 +79,4 @@ StateDirectory = "dnscrypt-proxy"; }; - ## syncthing for device <-> device filesharing and,,, syncing - ## still not set up, grrrr - services.syncthing = { - enable = false; - user = "serenity"; - dataDir = "/home/serenity/sync/"; - configDir = "/home/serenity/flakes/nixdots/home/common/dotconfig/syncthing/"; - #overrideDevices = true; - #overrideFolder = true; - - ## these 3 devices are pretty much my entire ecosystem for now - settings.devices = { - #hades.id = "DEVICE_ID"; - #proserpina.id = "DEVICE_ID"; - #hecate.id = "DEVICE_ID"; - }; - - ## plan to have this dir automatically committed and pushed to a git repo daily - settings.folders = { - #"FOLDER_ID" = { - #path = "/home/serenity/Documents/Notes"; - #devices = [ "hecate" "hades" "persephone" ]; - #}; - - }; - }; - } diff --git a/hosts/orcus/modules/network.nix b/hosts/orcus/modules/network.nix index 57a9871..f8774d3 100755 --- a/hosts/orcus/modules/network.nix +++ b/hosts/orcus/modules/network.nix @@ -15,36 +15,36 @@ }; #nameservers = [ - #"1.1.1.1" + #"1.1.1.1" #]; #proxy = { - #default = "https://user:password@proxy:port/"; - #noProxy = "127.0.0.1, localhost, internal.domain"; + #default = "https://user:password@proxy:port/"; + #noProxy = "127.0.0.1, localhost, internal.domain"; #}; - + }; ## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy networking.firewall = { enable = true; - #checkReversePath = "loose"; - #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; - #allowedUDPPortRanges = allowedTCPPortRanges; - #interfaces."DEVICENAME".allowedTCPPorts = [ - #22999 - #] - #allowedTCPPorts = [ - #22000 - #21027 - #25565 - #]; - #allowedUDPPorts = [ - #22000 - #21027 - #41641 - #51820 - #]; + #checkReversePath = "loose"; + #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; + #allowedUDPPortRanges = allowedTCPPortRanges; + #interfaces."DEVICENAME".allowedTCPPorts = [ + #22999 + #] + #allowedTCPPorts = [ + #22000 + #21027 + #25565 + #]; + #allowedUDPPorts = [ + #22000 + #21027 + #41641 + #51820 + #]; }; services.dnscrypt-proxy2 = { @@ -59,7 +59,8 @@ "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" ]; cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + minisign_key = + "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; }; # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md @@ -78,31 +79,4 @@ StateDirectory = "dnscrypt-proxy"; }; - ## syncthing for device <-> device filesharing and,,, syncing - ## still not set up, grrrr - services.syncthing = { - enable = false; - user = "serenity"; - dataDir = "/home/serenity/sync/"; - configDir = "/home/serenity/flakes/nixdots/home/common/dotconfig/syncthing/"; - #overrideDevices = true; - #overrideFolder = true; - - ## these 3 devices are pretty much my entire ecosystem for now - settings.devices = { - #hades.id = "DEVICE_ID"; - #proserpina.id = "DEVICE_ID"; - #hecate.id = "DEVICE_ID"; - }; - - ## plan to have this dir automatically committed and pushed to a git repo daily - settings.folders = { - #"FOLDER_ID" = { - #path = "/home/serenity/Documents/Notes"; - #devices = [ "hecate" "hades" "persephone" ]; - #}; - - }; - }; - } diff --git a/hosts/persephone/modules/network.nix b/hosts/persephone/modules/network.nix index 57a9871..f8774d3 100755 --- a/hosts/persephone/modules/network.nix +++ b/hosts/persephone/modules/network.nix @@ -15,36 +15,36 @@ }; #nameservers = [ - #"1.1.1.1" + #"1.1.1.1" #]; #proxy = { - #default = "https://user:password@proxy:port/"; - #noProxy = "127.0.0.1, localhost, internal.domain"; + #default = "https://user:password@proxy:port/"; + #noProxy = "127.0.0.1, localhost, internal.domain"; #}; - + }; ## i knooooowwwwwww i need a proper firewall config but im laaaazzyyyyyyyyyy networking.firewall = { enable = true; - #checkReversePath = "loose"; - #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; - #allowedUDPPortRanges = allowedTCPPortRanges; - #interfaces."DEVICENAME".allowedTCPPorts = [ - #22999 - #] - #allowedTCPPorts = [ - #22000 - #21027 - #25565 - #]; - #allowedUDPPorts = [ - #22000 - #21027 - #41641 - #51820 - #]; + #checkReversePath = "loose"; + #allowedTCPPortRanges = [ { from = 1720; to = 1770; } ]; + #allowedUDPPortRanges = allowedTCPPortRanges; + #interfaces."DEVICENAME".allowedTCPPorts = [ + #22999 + #] + #allowedTCPPorts = [ + #22000 + #21027 + #25565 + #]; + #allowedUDPPorts = [ + #22000 + #21027 + #41641 + #51820 + #]; }; services.dnscrypt-proxy2 = { @@ -59,7 +59,8 @@ "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" ]; cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + minisign_key = + "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; }; # You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md @@ -78,31 +79,4 @@ StateDirectory = "dnscrypt-proxy"; }; - ## syncthing for device <-> device filesharing and,,, syncing - ## still not set up, grrrr - services.syncthing = { - enable = false; - user = "serenity"; - dataDir = "/home/serenity/sync/"; - configDir = "/home/serenity/flakes/nixdots/home/common/dotconfig/syncthing/"; - #overrideDevices = true; - #overrideFolder = true; - - ## these 3 devices are pretty much my entire ecosystem for now - settings.devices = { - #hades.id = "DEVICE_ID"; - #proserpina.id = "DEVICE_ID"; - #hecate.id = "DEVICE_ID"; - }; - - ## plan to have this dir automatically committed and pushed to a git repo daily - settings.folders = { - #"FOLDER_ID" = { - #path = "/home/serenity/Documents/Notes"; - #devices = [ "hecate" "hades" "persephone" ]; - #}; - - }; - }; - }