Replace static zone file with dynamically generated records: - Add homelab.dns module with enable/cnames options - Extract IPs from systemd.network configs (filters VPN interfaces) - Use git commit timestamp as zone serial number - Move external hosts to separate external-hosts.nix Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
21 lines
436 B
Nix
21 lines
436 B
Nix
{ config, lib, ... }:
|
|
let
|
|
cfg = config.homelab.dns;
|
|
in
|
|
{
|
|
options.homelab.dns = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = true;
|
|
description = "Include this host in DNS zone generation";
|
|
};
|
|
|
|
cnames = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [ ];
|
|
description = "CNAME records pointing to this host";
|
|
example = [ "web" "api" ];
|
|
};
|
|
};
|
|
}
|