X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fdns.nix;h=b4772fcde9f20d5a5d00669abf80e0c11bef4bc2;hp=f0a3a5b9b1352d2614d3c4413b2df7b67d22660c;hb=8415083eb6acc343dfa404dbbc12fa0171a48a20;hpb=8fa7ff2c63fb0722144bc90837512d9f8b8c929d diff --git a/modules/private/dns.nix b/modules/private/dns.nix index f0a3a5b..b4772fc 100644 --- a/modules/private/dns.nix +++ b/modules/private/dns.nix @@ -1,5 +1,6 @@ { lib, pkgs, config, myconfig, ... }: { + options.myServices.dns.enable = lib.mkEnableOption "enable DNS resolver"; config = let cfg = config.services.bind; configFile = pkgs.writeText "named.conf" '' @@ -49,8 +50,7 @@ '') cfg.zones } ''; - in - { + in lib.mkIf config.myServices.dns.enable { networking.firewall.allowedUDPPorts = [ 53 ]; networking.firewall.allowedTCPPorts = [ 53 ]; services.bind = {