nix/nixos/containers/rdesktop.nix
2024-03-20 14:30:57 +09:00

30 lines
764 B
Nix

{ username, stateVersion, desktop, ... }: {
networking.firewall.allowedTCPPorts = [ 3390 ];
containers.rdesktop = {
autoStart = true;
privateNetwork = false;
specialArgs = { inherit username stateVersion desktop; };
config = { config, pkgs, lib, username, stateVersion, desktop, ... }: {
networking.hostName = "nixos-rdesktop";
system.stateVersion = stateVersion;
imports = [
../common/desktops/${desktop}
# ../users/${username}
];
networking.firewall = {
enable = true;
allowedTCPPorts = [ 3390 ];
};
services.xrdp = {
enable = true;
openFirewall = true;
port = 3390;
defaultWindowManager = "xfce4-session";
};
};
};
}