From 9c478c19952a369b14f632d5920a104c9cff74b8 Mon Sep 17 00:00:00 2001 From: 1000teslas <47207223+1000teslas@users.noreply.github.com> Date: Fri, 10 Dec 2021 00:42:46 +1100 Subject: [PATCH 1/2] nixos/xrdp: add confDir option --- nixos/modules/services/networking/xrdp.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix index c4f828f3c5a6..afbcb989dae8 100644 --- a/nixos/modules/services/networking/xrdp.nix +++ b/nixos/modules/services/networking/xrdp.nix @@ -97,6 +97,11 @@ in ''; }; + confDir = mkOption { + type = types.package; + default = confDir; + description = "The location of the config files for xrdp."; + }; }; }; @@ -149,7 +154,7 @@ in User = "xrdp"; Group = "xrdp"; PermissionsStartOnly = true; - ExecStart = "${cfg.package}/bin/xrdp --nodaemon --port ${toString cfg.port} --config ${confDir}/xrdp.ini"; + ExecStart = "${cfg.package}/bin/xrdp --nodaemon --port ${toString cfg.port} --config ${cfg.confDir}/xrdp.ini"; }; }; @@ -159,7 +164,7 @@ in description = "xrdp session manager"; restartIfChanged = false; # do not restart on "nixos-rebuild switch". like "display-manager", it can have many interactive programs as children serviceConfig = { - ExecStart = "${cfg.package}/bin/xrdp-sesman --nodaemon --config ${confDir}/sesman.ini"; + ExecStart = "${cfg.package}/bin/xrdp-sesman --nodaemon --config ${cfg.confDir}/sesman.ini"; ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID"; }; }; From 1906561f8db60072f97ab13460b2c17b52f28713 Mon Sep 17 00:00:00 2001 From: Kevin Tran <47207223+1000teslas@users.noreply.github.com> Date: Fri, 10 Dec 2021 09:08:45 +1100 Subject: [PATCH 2/2] Update nixos/modules/services/networking/xrdp.nix Co-authored-by: Ryan Mulligan --- nixos/modules/services/networking/xrdp.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix index afbcb989dae8..e9f123a181ae 100644 --- a/nixos/modules/services/networking/xrdp.nix +++ b/nixos/modules/services/networking/xrdp.nix @@ -98,7 +98,7 @@ in }; confDir = mkOption { - type = types.package; + type = types.path; default = confDir; description = "The location of the config files for xrdp."; };