kodi: relogin if crashing
This commit is contained in:
parent
85fd36d2e8
commit
6bc8b18f97
1 changed files with 9 additions and 17 deletions
|
@ -10,23 +10,15 @@
|
||||||
default = "kodi";
|
default = "kodi";
|
||||||
xterm.enable = false;
|
xterm.enable = false;
|
||||||
};
|
};
|
||||||
displayManager.lightdm = {
|
displayManager ={
|
||||||
|
sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoLogin.enable = true;
|
autoLogin = {
|
||||||
autoLogin.user = config.users.users.kodi.name;
|
enable = true;
|
||||||
|
relogin = true;
|
||||||
# todo test it
|
user = config.users.users.kodi.name;
|
||||||
# if kodi crashes restart the whole xsession to trigger the login
|
};
|
||||||
extraConfig = let
|
};
|
||||||
restartScript = pkgs.writers.writeBash "cleanup"
|
|
||||||
''
|
|
||||||
trap "" SIGHUP SIGINT SIGTERM
|
|
||||||
${pkgs.systemd}/bin/systemctl restart display-manager.service
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
''
|
|
||||||
session-cleanup-script=${restartScript}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue