Unverified Commit ece71c6f authored by misuzu's avatar misuzu Committed by GitHub
Browse files

nixos/headscale: remove much-loosened-up server_url check (#374374)

parents 31680c6f de0a499a
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -559,16 +559,6 @@ in

  config = lib.mkIf cfg.enable {
    assertions = [
      {
        # This is stricter than it needs to be but is exactly what upstream does:
        # https://github.com/kradalby/headscale/blob/adc084f20f843d7963c999764fa83939668d2d2c/hscontrol/types/config.go#L799
        assertion =
          with cfg.settings;
          dns.use_username_in_magic_dns or false
          || dns.base_domain == ""
          || !lib.hasInfix dns.base_domain server_url;
        message = "server_url cannot contain the base_domain, this will cause the headscale server and embedded DERP to become unreachable from the Tailscale node.";
      }
      {
        assertion = with cfg.settings; dns.magic_dns -> dns.base_domain != "";
        message = "dns.base_domain must be set when using MagicDNS";