nixos/open-webui: add openFirewall option

This commit is contained in:
Pol Dellaiera 2024-06-04 21:05:18 +02:00
parent 8ea262601a
commit 709eb8ebaf
No known key found for this signature in database
GPG Key ID: D476DFE9C67467CA

View File

@ -45,6 +45,15 @@ in
'';
description = "Extra environment variables for open-webui";
};
openFirewall = lib.mkOption {
type = types.bool;
default = false;
description = ''
Whether to open the firewall for Open-WebUI.
This adds `services.open-webui.port` to `networking.firewall.allowedTCPPorts`.
'';
};
};
};
@ -88,6 +97,8 @@ in
UMask = "0077";
};
};
networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.port ]; };
};
meta.maintainers = with lib.maintainers; [ shivaraj-bh ];