nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

Headscale: PR #467811 breaks `dns.extra_records_path` usage

Open humemm opened this issue 10 months ago • 3 comments

Nixpkgs version

  • Stable (25.11)

Describe the bug

PR #467811 added dns.extra_records with default = [ ], which is now always included in generated headscale.yaml. When users set dns.extra_records_path for dynamic DNS records, both settings appear, causing headscale to fail with:

Fatal config error: dns.extra_records and dns.extra_records_path are mutually exclusive

This allows extra_records_path to work without conflict while maintaining the ability to set static records when needed via extra_records = [...].

Steps to reproduce

use dns.extra_records_path option

Expected behaviour

should not include extra_records if extra_records_path exists

Notify maintainers

@SuperSandro2000 @x123 @kradalby @Misterio77


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a :+1: reaction to issues you find important.

humemm avatar Jan 30 '26 00:01 humemm

Changing the default to null fixes the issue

extra_records = lib.mkOption {
  type = lib.types.nullOr (
    lib.types.listOf (
      lib.types.submodule {
        options = {
          name = lib.mkOption {
            type = lib.types.str;
            description = "DNS record name.";
            example = "grafana.tailnet.example.com";
          };
          type = lib.mkOption {
            type = lib.types.enum [
              "A"
              "AAAA"
            ];
            description = "DNS record type.";
            example = "A";
          };
          value = lib.mkOption {
            type = lib.types.str;
            description = "DNS record value (IP address).";
            example = "100.64.0.3";
          };
        };
      }
    )
  );
  default = null;
  description = ''
    Extra DNS records to expose to clients.
  '';
  example = ''
    [ {
      name = "grafana.tailnet.example.com";
      type = "A";
      example = "100.64.0.3";
    } ]
  '';
};

humemm avatar Jan 30 '26 03:01 humemm

#485340

SuperSandro2000 avatar Jan 30 '26 14:01 SuperSandro2000

Stable (25.11)

I don't understand. https://github.com/NixOS/nixpkgs/pull/467811 wasn't backported.

dotlambda avatar Jan 30 '26 19:01 dotlambda