nix-conf/modules/system/dns/default.nix
2023-03-06 14:07:54 +01:00

25 lines
485 B
Nix

{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.system.dns;
in
{
options.custom.system.dns = with types; {
enable = mkBoolOpt false "Whether or not to enable creation of dns server.";
};
config = mkIf cfg.enable {
services.bind = {
enable = true;
forwarders = [];
zones = {
"." = {
file = pkgs.dns-root-data.path + "/root.hints";
master = true;
};
};
};
};
}