mirror of
https://codeberg.org/jopejoe1/nix-conf.git
synced 2025-01-04 09:36:33 +01:00
Forgot to commit dns module
This commit is contained in:
parent
50fd7e0d11
commit
88eb38fba3
1 changed files with 24 additions and 0 deletions
24
modules/system/dns/default.nix
Normal file
24
modules/system/dns/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ 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;
|
||||||
|
services.bind.forwarders = [];
|
||||||
|
zones = {
|
||||||
|
"." = {
|
||||||
|
file = pkgs.dns-root-data.path + "/root.hints";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue