After a really huge amount of tests, crashes and retries, I figured out something that works (with all the previous points checked).
I’m not really fan of the way it is expressed in the configuration.nix
file, and it give kind of a warning at nixos-rebuild
time. I will work on a PR to give a cleaner way of expression such scenarios. For now, here is a working solution :
xserver = {
enable = true;
libinput.enable = true;
displayManager.lightdm.enable = true;
displayManager.lightdm.autoLogin = { enable = true; user = "elyhaka"; };
desktopManager.default = "xsession";
displayManager.session = [
{
manage = "desktop";
name = "xsession";
start = ''exec $HOME/.xsession'';
}
];
};
I believe the same hack could be used to launch wayland session (maybe sway ?). I would need require some test, though.
I hope it will help somebody else, and if somebody knows a better way of doing it, please let me know