From c4768eb2fd78a3ddca0d24ef09fb7aa449840c6c Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Sun, 18 May 2025 14:00:31 +0200 Subject: [PATCH] Remove zerotier host aliases --- hosts.nix | 44 ++++++++++++++-------------- instances/baldur/configuration.nix | 8 +---- instances/freya/configuration.nix | 1 - instances/heimdall/configuration.nix | 1 - instances/loki/configuration.nix | 1 - instances/odin/configuration.nix | 1 - modules/hm/waybar.nix | 1 + modules/hm/zsh.nix | 5 ---- modules/nixos/basics/zerotier.nix | 19 ++++++------ modules/nixos/nextcloud.nix | 2 -- 10 files changed, 33 insertions(+), 50 deletions(-) diff --git a/hosts.nix b/hosts.nix index 08aff09..adee359 100644 --- a/hosts.nix +++ b/hosts.nix @@ -20,26 +20,26 @@ "thor.tsn" = "fd7a:115c:a1e0::7ecc:6224"; }; }; - zerotier = { - ipv4 = { - "baldur.zto" = "172.23.171.70"; - "freya.zto" = "172.23.18.147"; - "heimdall.zto" = "172.23.128.245"; - "loki.zto" = "172.23.254.55"; - "odin.zto" = "172.23.219.133"; - "thor.zto" = "172.23.24.223"; - "tiziano.zto" = "172.23.110.109"; - "x3pro.zto" = "172.23.255.161"; - }; - ipv6 = { - "baldur.zto" = "fd80:56c2:e21c:f9c7:5399:933b:abd2:a7c9"; - "freya.zto" = "fd80:56c2:e21c:f9c7:5399:93f3:ffbc:1355"; - "heimdall.zto" = "fd80:56c2:e21c:f9c7:5399:93b0:e66c:cda7"; - "loki.zto" = "fd80:56c2:e21c:f9c7:5399:93b3:aa75:fed1"; - "odin.zto" = "fd80:56c2:e21c:f9c7:5399:9379:ef39:0dd3"; - "thor.zto" = "fd80:56c2:e21c:f9c7:5399:9324:3c16:6499"; - "tiziano.zto" = "fd80:56c2:e21c:f9c7:5399:93f3:4bbb:8b38"; - "x3pro.zto" = "fd80:56c2:e21c:f9c7:5399:9379:6b02:be97"; - }; - }; + # zerotier = { + # ipv4 = { + # "baldur.zto" = "172.23.171.70"; + # "freya.zto" = "172.23.18.147"; + # "heimdall.zto" = "172.23.128.245"; + # "loki.zto" = "172.23.254.55"; + # "odin.zto" = "172.23.219.133"; + # "thor.zto" = "172.23.24.223"; + # "tiziano.zto" = "172.23.110.109"; + # "x3pro.zto" = "172.23.255.161"; + # }; + # ipv6 = { + # "baldur.zto" = "fd80:56c2:e21c:f9c7:5399:933b:abd2:a7c9"; + # "freya.zto" = "fd80:56c2:e21c:f9c7:5399:93f3:ffbc:1355"; + # "heimdall.zto" = "fd80:56c2:e21c:f9c7:5399:93b0:e66c:cda7"; + # "loki.zto" = "fd80:56c2:e21c:f9c7:5399:93b3:aa75:fed1"; + # "odin.zto" = "fd80:56c2:e21c:f9c7:5399:9379:ef39:0dd3"; + # "thor.zto" = "fd80:56c2:e21c:f9c7:5399:9324:3c16:6499"; + # "tiziano.zto" = "fd80:56c2:e21c:f9c7:5399:93f3:4bbb:8b38"; + # "x3pro.zto" = "fd80:56c2:e21c:f9c7:5399:9379:6b02:be97"; + # }; + # }; } diff --git a/instances/baldur/configuration.nix b/instances/baldur/configuration.nix index 8f41ecd..6f33787 100644 --- a/instances/baldur/configuration.nix +++ b/instances/baldur/configuration.nix @@ -1,10 +1,4 @@ -{ pkgs, ... }: -# let -# heimdall_hosts = lib.attrsets.filterAttrs (k: v: builtins.elem "heimdall.zto" v) config.networking.hosts; -# heimdall_ipv4 = builtins.elemAt 0 (builtins.attrNames heimdall_hosts); -# in -{ - +{ pkgs, ... }: { boot = { growPartition = true; kernelParams = [ diff --git a/instances/freya/configuration.nix b/instances/freya/configuration.nix index b676af7..2e02bda 100644 --- a/instances/freya/configuration.nix +++ b/instances/freya/configuration.nix @@ -134,7 +134,6 @@ in http = { use_x_forwarded_for = true; trusted_proxies = [ - # hosts.zerotier.ipv4."baldur.zto" hosts.tailscale.ipv4."baldur.tsn" "::1" "127.0.0.1" diff --git a/instances/heimdall/configuration.nix b/instances/heimdall/configuration.nix index e8fad97..5a456e2 100644 --- a/instances/heimdall/configuration.nix +++ b/instances/heimdall/configuration.nix @@ -187,7 +187,6 @@ in http = { use_x_forwarded_for = true; trusted_proxies = [ - # hosts.zerotier.ipv4."baldur.zto" hosts.tailscale.ipv4."baldur.tsn" "::1" "127.0.0.1" diff --git a/instances/loki/configuration.nix b/instances/loki/configuration.nix index bb36964..740e874 100644 --- a/instances/loki/configuration.nix +++ b/instances/loki/configuration.nix @@ -274,7 +274,6 @@ in http = { use_x_forwarded_for = true; trusted_proxies = [ - hosts.zerotier.ipv4."baldur.zto" hosts.tailscale.ipv4."baldur.tsn" "::1" "127.0.0.1" diff --git a/instances/odin/configuration.nix b/instances/odin/configuration.nix index 215324c..19e327d 100644 --- a/instances/odin/configuration.nix +++ b/instances/odin/configuration.nix @@ -173,7 +173,6 @@ in http = { use_x_forwarded_for = true; trusted_proxies = [ - hosts.zerotier.ipv4."baldur.zto" hosts.tailscale.ipv4."baldur.tsn" "::1" "127.0.0.1" diff --git a/modules/hm/waybar.nix b/modules/hm/waybar.nix index bc73b62..931816a 100644 --- a/modules/hm/waybar.nix +++ b/modules/hm/waybar.nix @@ -113,6 +113,7 @@ in # "hwmon-path"= "/sys/class/hwmon/hwmon2/temp1_input"; "critical-threshold" = 90; "format" = "{temperatureC}°C {icon}"; + "format-critical" = "!{temperatureC}⁰C {icon}"; "format-icons" = [ "" ]; } // (if hostName == "sif" then { "hwmon-path" = "/sys/class/hwmon/hwmon7/temp1_input"; diff --git a/modules/hm/zsh.nix b/modules/hm/zsh.nix index 0dd7923..2b35566 100644 --- a/modules/hm/zsh.nix +++ b/modules/hm/zsh.nix @@ -27,10 +27,5 @@ ]; extraConfig = ""; }; - - # prezto = { - # enable = true; - # }; - }; } diff --git a/modules/nixos/basics/zerotier.nix b/modules/nixos/basics/zerotier.nix index 3f54c89..d1082b2 100644 --- a/modules/nixos/basics/zerotier.nix +++ b/modules/nixos/basics/zerotier.nix @@ -1,17 +1,16 @@ -{ lib, ... }: -let - hosts = import ../../../hosts.nix; - zerotier_hosts = lib.attrsets.mapAttrs' - ( - k: v: lib.attrsets.nameValuePair v [ k ] - ) - hosts.zerotier.ipv4; -in +# let +# hosts = import ../../../hosts.nix; +# zerotier_hosts = lib.attrsets.mapAttrs' +# ( +# k: v: lib.attrsets.nameValuePair v [ k ] +# ) +# hosts.zerotier.ipv4; +# in { services.zerotierone = { enable = true; joinNetworks = [ "8056c2e21cf9c753" ]; }; - networking.hosts = zerotier_hosts; + # networking.hosts = zerotier_hosts; } diff --git a/modules/nixos/nextcloud.nix b/modules/nixos/nextcloud.nix index ad9b792..67b972d 100644 --- a/modules/nixos/nextcloud.nix +++ b/modules/nixos/nextcloud.nix @@ -62,8 +62,6 @@ in "OC\\Preview\\EMF" ]; trusted_proxies = [ - # hosts.zerotier.ipv4."baldur.zto" - # hosts.zerotier.ipv6."baldur.zto" hosts.tailscale.ipv4."baldur.tsn" hosts.tailscale.ipv6."baldur.tsn" ];