1
1
Fork 1
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:
oddlama 2024-06-20 17:48:24 +02:00
parent 40c030792d
commit a98b1345ce
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -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;
}