From 6a0fd12cf07df4ee54643f64d34438ce03869a5e Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 15 Mar 2022 18:35:41 +0100 Subject: yggdrasil-wg: dns --- modules/yggdrasil-wg/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'modules') 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 sif = ["${batSubnet}:2::/${toString batHostLength}"]; }; routers = [ "surtr" ]; - hostNames = { - vidhar = [ "grafana.vidhar.yggdrasil" ]; - }; mkPublicKeyPath = family: host: ./hosts + "/${family}" + "/${host}.pub"; mkPrivateKeyPath = family: host: ./hosts + "/${family}" + "/${host}.priv"; @@ -205,6 +202,8 @@ in { Name = "yggdrasil"; }; address = batHostIPs.${hostName}; + dns = ["[2a03:4000:52:ada:1:1::]"]; + domains = ["yggdrasil"]; routes = [ { routeConfig = { Destination = "${batSubnet}::/${toString batSubnetLength}"; @@ -247,8 +246,6 @@ in { sops.secrets = listToAttrs (map familyToSopsSecret hostFamilies); - networking.hosts = mkIf inNetwork (listToAttrs (concatMap ({name, value}: map (ip: nameValuePair (stripSubnet ip) (["${name}.yggdrasil"] ++ (hostNames.${name} or []))) value) (mapAttrsToList nameValuePair batHostIPs))); - boot.extraModulePackages = optional (versionOlder kernel.kernel.version "5.6") kernel.wireguard ++ [kernel.batman_adv]; environment.systemPackages = with pkgs; [ wireguard-tools batctl ]; 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; -- cgit v1.2.3