That helped. On rebuild it complained about already defined ExecStart, so I removed 1st one. It works but I need to figure out also how to start Hyprland. It looks now like this:
That line with Env is wrong. That option should be probably here, but I don’t know which one.
I forget that in configuration.nix there is already autologin: services.getty.autologinUser = "mee";
I disabled it and my systemd service getty@tty1 doesn’t work.
Maybe I can somehow add option from here to start Hyprland.
I’m trying to find out the simplest solution from all of them. In this video it seems reasonable. I had in the past similar line like that. Or if you can look on my prev post if I can do it with services.getty.
I use the below config using greetd. It’ll autologin and start Hyprland when you first boot. After you logout, it’ll start tuigreet, a TUI greeter, where you’ll need to type in your password to login. You could also read the docs for more info. Be sure to change the username variable to your username.
hello. awesome solution. i am using your config but the only weird problem i have is when i log out, my cmd is “md” for some reason and not Hyprland like i specified in the session variable. Do you have any idea why this could happen?
Here’s a simpler alternative to greetd that achieves the same goal - auto-launch Hyprland on boot but stay on TTY when exiting:
# Dead simple TTY-based auto-login setup for Hyprland
services.xserver.displayManager.lightdm.enable = false; # Disable default display manager (ensure no other DMs are enabled)
services.getty.autologinUser = "<username>"; # Auto-login user on boot
environment.loginShellInit = ''
# Launch Hyprland on TTY1, return to TTY when exiting
if [ "$(tty)" = "/dev/tty1" ]; then
Hyprland # Use `exec Hyprland` to auto-restart on exit/crash instead
fi
'';