mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-15 13:37:21 +03: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