mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 07:29:23 +08:00
modules.services.xrdp: drop, since plasma will not support it
This commit is contained in:
@@ -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 =
|
||||
|
||||
@@ -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; };
|
||||
}
|
||||
)
|
||||
)
|
||||
]);
|
||||
}
|
||||
Reference in New Issue
Block a user