@@ -97,6 +97,11 @@ in
9797 '';
9898 };
9999
100+ confDir = mkOption {
101+ type = types.path;
102+ default = confDir;
103+ description = "The location of the config files for xrdp.";
104+ };
100105 };
101106 };
102107
@@ -149,7 +154,7 @@ in
149154 User = "xrdp";
150155 Group = "xrdp";
151156 PermissionsStartOnly = true;
152− ExecStart = "${cfg.package}/bin/xrdp --nodaemon --port ${toString cfg.port} --config ${confDir}/xrdp.ini";
157+ ExecStart = "${cfg.package}/bin/xrdp --nodaemon --port ${toString cfg.port} --config ${cfg.confDir}/xrdp.ini";
153158 };
154159 };
155160
@@ -159,7 +164,7 @@ in
159164 description = "xrdp session manager";
160165 restartIfChanged = false; # do not restart on "nixos-rebuild switch". like "display-manager", it can have many interactive programs as children
161166 serviceConfig = {
162− ExecStart = "${cfg.package}/bin/xrdp-sesman --nodaemon --config ${confDir}/sesman.ini";
167+ ExecStart = "${cfg.package}/bin/xrdp-sesman --nodaemon --config ${cfg.confDir}/sesman.ini";
163168 ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
164169 };
165170 };