diff --git a/modules/machine/valefor/configuration.nix b/modules/machine/valefor/configuration.nix index 9e657c5..dc84590 100644 --- a/modules/machine/valefor/configuration.nix +++ b/modules/machine/valefor/configuration.nix @@ -87,7 +87,7 @@ # Core networking module (see ../../networking/core.nix) network = { firewall.enable = true; - networkmanager.enable = true; + networkManager.enable = true; }; # DNS module (see ../../networking/dns.nix) diff --git a/modules/networking/dns.nix b/modules/networking/dns.nix index 2d0ccb0..136bcae 100644 --- a/modules/networking/dns.nix +++ b/modules/networking/dns.nix @@ -98,34 +98,12 @@ in { }) (lib.mkIf cfg.technitium.enable { - systemd.services.technitium-dns = { - description = "Technitium DNS Server"; - wantedBy = ["multi-user.target"]; - - serviceConfig = { - ExecStart = "${pkgs.technitium}/bin/dns-server-start.sh"; - Restart = "on-failure"; - }; - - # Environment configuration - environment = - { - DNS_LISTEN_ADDRESS = cfg.technitium.settings.address; - DNS_LISTEN_PORT = toString cfg.technitium.settings.port; - } - // lib.mapAttrs' ( - name: value: - lib.nameValuePair "DNS_${lib.toUpper name}" (toString value) - ) - cfg.technitium.settings.extraOptions; + services.technitium-dns-server = { + enable = true; + openFirewall = true; + firewallTCPPorts = [53 5380 53443]; + firewallUDPPorts = [53]; }; - - networking.firewall = { - allowedTCPPorts = [53 cfg.technitium.settings.port]; - allowedUDPPorts = [53 cfg.technitium.settings.port]; - }; - - environment.systemPackages = [pkgs.technitium]; }) ]; }