diff options
Diffstat (limited to 'modules/yggdrasil-wg')
| -rw-r--r-- | modules/yggdrasil-wg/default.nix | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 82002a05..66d14c95 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix | |||
| @@ -77,9 +77,6 @@ let | |||
| 77 | sif = ["${batSubnet}:2::/${toString batHostLength}"]; | 77 | sif = ["${batSubnet}:2::/${toString batHostLength}"]; |
| 78 | }; | 78 | }; |
| 79 | routers = [ "surtr" ]; | 79 | routers = [ "surtr" ]; |
| 80 | hostNames = { | ||
| 81 | vidhar = [ "grafana.vidhar.yggdrasil" ]; | ||
| 82 | }; | ||
| 83 | 80 | ||
| 84 | mkPublicKeyPath = family: host: ./hosts + "/${family}" + "/${host}.pub"; | 81 | mkPublicKeyPath = family: host: ./hosts + "/${family}" + "/${host}.pub"; |
| 85 | mkPrivateKeyPath = family: host: ./hosts + "/${family}" + "/${host}.priv"; | 82 | mkPrivateKeyPath = family: host: ./hosts + "/${family}" + "/${host}.priv"; |
| @@ -205,6 +202,8 @@ in { | |||
| 205 | Name = "yggdrasil"; | 202 | Name = "yggdrasil"; |
| 206 | }; | 203 | }; |
| 207 | address = batHostIPs.${hostName}; | 204 | address = batHostIPs.${hostName}; |
| 205 | dns = ["[2a03:4000:52:ada:1:1::]"]; | ||
| 206 | domains = ["yggdrasil"]; | ||
| 208 | routes = [ | 207 | routes = [ |
| 209 | { routeConfig = { | 208 | { routeConfig = { |
| 210 | Destination = "${batSubnet}::/${toString batSubnetLength}"; | 209 | Destination = "${batSubnet}::/${toString batSubnetLength}"; |
| @@ -247,8 +246,6 @@ in { | |||
| 247 | 246 | ||
| 248 | sops.secrets = listToAttrs (map familyToSopsSecret hostFamilies); | 247 | sops.secrets = listToAttrs (map familyToSopsSecret hostFamilies); |
| 249 | 248 | ||
| 250 | networking.hosts = mkIf inNetwork (listToAttrs (concatMap ({name, value}: map (ip: nameValuePair (stripSubnet ip) (["${name}.yggdrasil"] ++ (hostNames.${name} or []))) value) (mapAttrsToList nameValuePair batHostIPs))); | ||
| 251 | |||
| 252 | boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard ++ [kernel.batman_adv]; | 249 | boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard ++ [kernel.batman_adv]; |
| 253 | environment.systemPackages = with pkgs; [ wireguard-tools batctl ]; | 250 | environment.systemPackages = with pkgs; [ wireguard-tools batctl ]; |
| 254 | networking.networkmanager.unmanaged = ["yggdrasil" "ip6gre0" "ip6tnl0"] ++ map (family: "yggdrasil-wg-${family}") hostFamilies ++ concatMap (family: map ({from, to, ...}: let other = if thisHost from then to else from; in "yggre-${other}-${family}") hostLinks.${family}) hostFamilies; | 251 | networking.networkmanager.unmanaged = ["yggdrasil" "ip6gre0" "ip6tnl0"] ++ map (family: "yggdrasil-wg-${family}") hostFamilies ++ concatMap (family: map ({from, to, ...}: let other = if thisHost from then to else from; in "yggre-${other}-${family}") hostLinks.${family}) hostFamilies; |
