nixos/xrdp: add openFirewall option
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user