mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 17:33:09 +00:00
nixos/xrdp: add openFirewall option
This commit is contained in:
parent
c7937f0a3d
commit
03071fd5e3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user