From 94b52a7720c324a19a64ffbdfc4f11999ec2b679 Mon Sep 17 00:00:00 2001 From: kat Date: Sun, 18 Sep 2022 10:43:53 -0700 Subject: [PATCH] feat: validate terraform use --- nixos/network.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nixos/network.nix b/nixos/network.nix index c4102990..1f2d8a29 100644 --- a/nixos/network.nix +++ b/nixos/network.nix @@ -158,10 +158,13 @@ zone = mkDefault "gensokyo.zone."; create_domain = true; }; - tailscale = { - interfaces = singleton "tailscale0"; + tailscale = mkMerge [ + (mkIf (cfg.tf.enable) { ipv4 = meta.tailnet.${config.networking.hostName}.ipv4 or null; ipv6 = meta.tailnet.${config.networking.hostName}.ipv6 or null; + }) + { + interfaces = singleton "tailscale0"; zone = "inskip.me."; create_domain = true; };