nixos/xrdp: add openFirewall option

This commit is contained in:
Maciej Krüger 2021-06-10 06:50:29 +02:00
parent c7937f0a3d
commit 03071fd5e3
No known key found for this signature in database
GPG Key ID: 0D948CE19CF49C5F

View File

@ -61,6 +61,12 @@ in
'';
};
openFirewall = mkOption {
default = false;
type = types.bool;
description = "Whether to open the firewall for the specified RDP port.";
};
sslKey = mkOption {
type = types.str;
default = "/etc/xrdp/key.pem";
@ -99,6 +105,8 @@ in
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
# xrdp can run X11 program even if "services.xserver.enable = false"
xdg = {
autostart.enable = true;