Before switching to home-manager
I used this xserver
block in configuration.nix
to automatically open my graphical session (I use full disk encryption, thus, I don’t want to enter password twice at boot) :
services.xserver = {
enable = true;
desktopManager.default = "none";
windowManager.default = "i3";
windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
};
layout = "us";
xkbVariant = "intl";
libinput.enable = true;
displayManager.auto = { enable = true; user = "elyhaka"; };
};
Now, in my home.nix
I have :
xsession.enable = true;
xsession.windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
}
I see that home-manager
has created a .xsession
script inside my home directory that can be used for a xorg initialization.
My question is, how can I obtain the same behavior? That is:
- I want to automatically open my i3 session
- I do not want to type a password at boot, but,
- If my i3 session is closed I want to be brought back to
lightdm
or whateverdisplayManager
.