summaryrefslogtreecommitdiff
path: root/modules/yggdrasil-wg/default.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2021-12-31 17:01:36 +0100
committerGregor Kleen <gkleen@yggdrasil.li>2021-12-31 17:01:36 +0100
commit8deefff11f92dc28424580989193e09c61906151 (patch)
tree06605f31299ff0aad09ed8fdee052523ac9be598 /modules/yggdrasil-wg/default.nix
parente1483ff2214541c2ad3f2f99770ed41544bb8721 (diff)
downloadnixos-8deefff11f92dc28424580989193e09c61906151.tar
nixos-8deefff11f92dc28424580989193e09c61906151.tar.gz
nixos-8deefff11f92dc28424580989193e09c61906151.tar.bz2
nixos-8deefff11f92dc28424580989193e09c61906151.tar.xz
nixos-8deefff11f92dc28424580989193e09c61906151.zip
vidhar: grafana
Diffstat (limited to 'modules/yggdrasil-wg/default.nix')
-rw-r--r--modules/yggdrasil-wg/default.nix5
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 ];