nix-conf/modules/system/dns/default.nix

27 lines
525 B
Nix
Raw Normal View History

2023-03-06 13:52:34 +01:00
{ 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;
2023-03-06 13:53:14 +01:00
forwarders = [];
2023-03-06 15:02:23 +01:00
zones = {
"geek" = {
master = false;
masters = [ "202.83.95.229" ];
2023-03-06 16:03:08 +01:00
file = "/etc/bind/zones/slaves/geek.zone";
2023-03-06 15:02:23 +01:00
};
2023-03-06 15:01:15 +01:00
};
};
2023-03-06 13:52:34 +01:00
};
}