Headscale: PR #467811 breaks `dns.extra_records_path` usage
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
- [x] I assert that this is a bug and not a support request.
- [x] I assert that this is not a duplicate of an existing issue.
- [x] I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a :+1: reaction to issues you find important.
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";
} ]
'';
};
#485340
Stable (25.11)
I don't understand. https://github.com/NixOS/nixpkgs/pull/467811 wasn't backported.