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";
|
||||
xterm.enable = false;
|
||||
};
|
||||
displayManager.lightdm = {
|
||||
displayManager ={
|
||||
sddm = {
|
||||
enable = true;
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = config.users.users.kodi.name;
|
||||
|
||||
# todo test it
|
||||
# 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}
|
||||
'';
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
relogin = true;
|
||||
user = config.users.users.kodi.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue