mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-26 02:05:02 +00:00
nixos/crab-hole: Add openFirewall option to services.crab-hole (#545002)
This commit is contained in:
@@ -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 = [
|
||||
|
||||
Reference in New Issue
Block a user