From 9eaa1e467010ca79d0b45594244ae933a6f22655 Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Tue, 18 Mar 2025 02:40:09 +0800 Subject: [PATCH] feat(nixos): autologin and start Hyprland at boot --- systems/modules/desktop.nix | 1 + systems/modules/programs/getty.nix | 5 +++++ users/modules/programs/zsh.nix | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 systems/modules/programs/getty.nix diff --git a/systems/modules/desktop.nix b/systems/modules/desktop.nix index be70239..db1e7b9 100644 --- a/systems/modules/desktop.nix +++ b/systems/modules/desktop.nix @@ -2,5 +2,6 @@ imports = [ ./programs/hyprland.nix ./programs/hyprlock.nix + ./programs/getty.nix ]; } diff --git a/systems/modules/programs/getty.nix b/systems/modules/programs/getty.nix new file mode 100644 index 0000000..08faabb --- /dev/null +++ b/systems/modules/programs/getty.nix @@ -0,0 +1,5 @@ +{ + services.getty = { + autologinUser = "rafiq"; + }; +} diff --git a/users/modules/programs/zsh.nix b/users/modules/programs/zsh.nix index 21d495b..89616ae 100644 --- a/users/modules/programs/zsh.nix +++ b/users/modules/programs/zsh.nix @@ -4,5 +4,11 @@ enableCompletion = true; enableVteIntegration = true; # TODO: Look into whether we need to add the history attribute + profileExtra = # bash + '' + if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then + dbus-run-session Hyprland + fi + ''; }; }