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} + ''; }; };