mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 23:00:39 +02:00
feat: add autologin and hyprland autostart
This commit is contained in:
parent
40c030792d
commit
a98b1345ce
1 changed files with 11 additions and 0 deletions
|
@ -53,5 +53,16 @@ in
|
|||
inherit (config.users.users.${myuser}) uid;
|
||||
username = config.users.users.${myuser}.name;
|
||||
};
|
||||
|
||||
# Autostart hyprland if on tty1 (once, don't restart after logout)
|
||||
programs.zsh.initExtra = lib.mkOrder 9999 ''
|
||||
if [[ -t 0 && "$(tty || true)" == /dev/tty1 && -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" ]]; then
|
||||
echo "Login shell detected. Starting hyprland..."
|
||||
dbus-run-session Hyprland
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# Autologin
|
||||
services.getty.autologinUser = myuser;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue