nixos/crab-hole: Add openFirewall option to services.crab-hole (#545002)

This commit is contained in:
h7x4
2026-08-21 15:23:54 +00:00
committed by GitHub

View File

@@ -35,6 +35,12 @@ in
package = lib.mkPackageOption pkgs "crab-hole" { };
openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Open ports in the firewall for crab-hole's DNS server.";
};
supplementaryGroups = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [ ];
@@ -170,6 +176,11 @@ in
RestartSec = 1;
};
};
networking.firewall = lib.mkIf cfg.openFirewall {
allowedUDPPorts = [ 53 ];
allowedTCPPorts = [ 53 ];
};
};
meta.maintainers = [