diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/yggdrasil-wg/default.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/yggdrasil-wg/default.nix b/modules/yggdrasil-wg/default.nix index 3690964f..16f8d3a9 100644 --- a/modules/yggdrasil-wg/default.nix +++ b/modules/yggdrasil-wg/default.nix | |||
@@ -77,6 +77,9 @@ 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 | }; | ||
80 | 83 | ||
81 | mkPublicKeyPath = family: host: ./hosts + "/${family}" + "/${host}.pub"; | 84 | mkPublicKeyPath = family: host: ./hosts + "/${family}" + "/${host}.pub"; |
82 | mkPrivateKeyPath = family: host: ./hosts + "/${family}" + "/${host}.priv"; | 85 | mkPrivateKeyPath = family: host: ./hosts + "/${family}" + "/${host}.priv"; |
@@ -241,7 +244,7 @@ in { | |||
241 | 244 | ||
242 | sops.secrets = listToAttrs (map familyToSopsSecret hostFamilies); | 245 | sops.secrets = listToAttrs (map familyToSopsSecret hostFamilies); |
243 | 246 | ||
244 | networking.hosts = mkIf inNetwork (listToAttrs (concatMap ({name, value}: map (ip: nameValuePair (stripSubnet ip) ["${name}.yggdrasil"]) value) (mapAttrsToList nameValuePair batHostIPs))); | 247 | networking.hosts = mkIf inNetwork (listToAttrs (concatMap ({name, value}: map (ip: nameValuePair (stripSubnet ip) (["${name}.yggdrasil"] ++ (hostNames.${name} or []))) value) (mapAttrsToList nameValuePair batHostIPs))); |
245 | 248 | ||
246 | 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]; |
247 | environment.systemPackages = with pkgs; [ wireguard-tools batctl ]; | 250 | environment.systemPackages = with pkgs; [ wireguard-tools batctl ]; |