From fb821882d3ab68fb5bb23e61fcef94076a2feaef Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Mon, 16 Dec 2019 21:57:09 +1300 Subject: [PATCH] porani: wip on relogin on kodi crash --- configs/porani/kodi.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configs/porani/kodi.nix b/configs/porani/kodi.nix index 8f28505..23863de 100644 --- a/configs/porani/kodi.nix +++ b/configs/porani/kodi.nix @@ -17,9 +17,16 @@ # todo test it # if kodi crashes restart the whole xsession to trigger the login - extraConfig = '' - session-cleanup-script=service lightdm restart + extraConfig = let + restartScript = pkgs.writers.writeBash "cleanup" + '' + trap "" SIGHUP SIGINT SIGTERM + ${pkgs.systemd}/bin/systemctl restart display-manager.service ''; + in + '' + session-cleanup-script=${restartScript} + ''; }; };