mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
nixos/open-webui: add openFirewall
option
This commit is contained in:
parent
8ea262601a
commit
709eb8ebaf
@ -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 ];
|
||||
|
Loading…
Reference in New Issue
Block a user