mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-07 21:06:51 +01:00
31 lines
692 B
Nix
31 lines
692 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 = {
|
|
"geek" = {
|
|
master = false;
|
|
masters = [ "202.83.95.229" ];
|
|
file = "/etc/bind/zones/slaves/geek.zone";
|
|
};
|
|
"glue" = {
|
|
master = false;
|
|
masters = [ "195.201.99.61" "168.119.153.26" ];
|
|
file = "/etc/bind/zones/slaves/glue.zone";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|