summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorRyan Mulligan <ryan@ryantm.com>2021-12-11 10:45:53 -0800
committerGitHub <noreply@github.com>2021-12-11 10:45:53 -0800
commitc84ba61d73b1b773816628a98e73d38795f2383a (patch)
treee63bc05b78994d88bb267450cc4beca0ce2adb09 /nixos/modules
parent269390af5cb9869a2bbd74fdbfbb076835c35f4d (diff)
parent1906561f8db60072f97ab13460b2c17b52f28713 (diff)
downloadnixpkgs-c84ba61d73b1b773816628a98e73d38795f2383a.tar
nixpkgs-c84ba61d73b1b773816628a98e73d38795f2383a.tar.gz
nixpkgs-c84ba61d73b1b773816628a98e73d38795f2383a.tar.bz2
nixpkgs-c84ba61d73b1b773816628a98e73d38795f2383a.tar.lz
nixpkgs-c84ba61d73b1b773816628a98e73d38795f2383a.tar.xz
nixpkgs-c84ba61d73b1b773816628a98e73d38795f2383a.tar.zst
nixpkgs-c84ba61d73b1b773816628a98e73d38795f2383a.zip
Merge pull request #149860 from 1000teslas/xrdp-conf
nixos/xrdp: add confDir option
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/networking/xrdp.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix
index c4f828f3c5a..e9f123a181a 100644
--- a/nixos/modules/services/networking/xrdp.nix
+++ b/nixos/modules/services/networking/xrdp.nix
@@ -97,6 +97,11 @@ in
         '';
       };
 
+      confDir = mkOption {
+        type = types.path;
+        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";
         };
       };