modules.services.xrdp: drop, since plasma will not support it

This commit is contained in:
2025-11-27 16:49:27 +08:00
parent ef592ca014
commit 4e2354c202
2 changed files with 0 additions and 37 deletions

View File

@@ -23,7 +23,6 @@ inputs:
{
sshd.motd = true;
beesd."/" = { hashTableSizeMB = 128; threads = 4; };
xrdp = { enable = true; hostname = [ "srv1.chn.moe" ]; };
samba = { hostsAllowed = ""; shares = { home.path = "/home"; root.path = "/"; }; };
};
packages =

View File

@@ -1,36 +0,0 @@
inputs:
{
options.nixos.services.xrdp = let inherit (inputs.lib) mkOption types; in
{
enable = mkOption { type = types.bool; default = false; };
port = mkOption { type = types.ints.unsigned; default = 3389; };
hostname = mkOption { type = types.nullOr (types.nonEmptyListOf types.nonEmptyStr); default = null; };
};
config = let inherit (inputs.config.nixos.services) xrdp;
in inputs.lib.mkIf xrdp.enable (inputs.lib.mkMerge
[
{
services.xrdp =
{
enable = true;
port = xrdp.port;
openFirewall = true;
defaultWindowManager = "${inputs.pkgs.kdePackages.plasma-workspace}/bin/startplasma-x11";
};
}
(
inputs.lib.mkIf (xrdp.hostname != null)
(
let mainDomain = builtins.elemAt xrdp.hostname 0;
in
{
services.xrdp =
let keydir = inputs.config.security.acme.certs.${mainDomain}.directory;
in { sslCert = "${keydir}/full.pem"; sslKey = "${keydir}/key.pem"; };
nixos.services.acme.cert.${mainDomain} =
{ domains = xrdp.hostname; group = inputs.config.systemd.services.xrdp.serviceConfig.Group; };
}
)
)
]);
}