From 830669ca05c41545679f452957baed18abc9a927 Mon Sep 17 00:00:00 2001 From: Volth Date: Tue, 2 May 2017 18:46:53 +0000 Subject: [PATCH 1/2] xrdp: do not restart xrdp-sesman on nixos-rebuild --- nixos/modules/services/networking/xrdp.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix index bf59130ce5b..634b0e7efb6 100644 --- a/nixos/modules/services/networking/xrdp.nix +++ b/nixos/modules/services/networking/xrdp.nix @@ -133,8 +133,10 @@ in wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; 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"; + ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID"; }; }; From 9bce416637ec210925addb7babfdc367dd99b12d Mon Sep 17 00:00:00 2001 From: Volth Date: Tue, 2 May 2017 21:07:57 +0000 Subject: [PATCH 2/2] xrdp: environment.pathsToLink from xserver.nix --- nixos/modules/services/networking/xrdp.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nixos/modules/services/networking/xrdp.nix b/nixos/modules/services/networking/xrdp.nix index 634b0e7efb6..bf23c6ae619 100644 --- a/nixos/modules/services/networking/xrdp.nix +++ b/nixos/modules/services/networking/xrdp.nix @@ -93,6 +93,11 @@ in config = mkIf cfg.enable { + # copied from + # xrdp can run X11 program even if "services.xserver.enable = false" + environment.pathsToLink = + [ "/etc/xdg" "/share/xdg" "/share/applications" "/share/icons" "/share/pixmaps" ]; + systemd = { services.xrdp = { wantedBy = [ "multi-user.target" ];