Skip to content

Commit de0a499

Browse files
committed
nixos/headscale: remove much-loosened-up server_url check
server_url check [has been loosened upstream][1] and backported to NixOS[2]. The new, much looser check, is not practical to be implemented in Nix (you are welcome to give it a try; I've implemented the original one). Since the surface area is much smaller now (and the scenario much less common), I think we can remove this assertion altogether. [1]: juanfont/headscale#2248 [2]: NixOS#358255
1 parent 3817f78 commit de0a499

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

nixos/modules/services/networking/headscale.nix

-10
Original file line numberDiff line numberDiff line change
@@ -559,16 +559,6 @@ in
559559

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

0 commit comments

Comments
 (0)