system: Open dnsmasq ports with hotspot option

Makes it possible to connect to mobile hotspots. Now the PinePhone is
a lot more useful.
This commit is contained in:
Donovan Glover 2024-08-15 10:55:57 -04:00
parent f4193012f9
commit b14eca2c55
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -14,6 +14,7 @@ let
mkEnableOption
mkIf
singleton
optional
;
inherit (cfg)
@ -23,6 +24,7 @@ let
mullvad
allowSRB2Port
allowDevPort
hotspot
noRoot
postgres
;
@ -79,6 +81,7 @@ in
postgres = mkEnableOption "postgres database for containers";
allowSRB2Port = mkEnableOption "port for srb2";
allowDevPort = mkEnableOption "port for development server";
hotspot = mkEnableOption "mobile hotspot support";
};
config = {
@ -246,7 +249,13 @@ in
};
firewall = {
allowedUDPPorts = mkIf allowSRB2Port [ 5029 ];
allowedUDPPorts =
optional hotspot [
67
68
]
++ optional allowSRB2Port [ 5029 ];
allowedTCPPorts = mkIf allowDevPort [ 3000 ];
};
};