From 839b7404cf61961c48b183ec6f7928abbd90007d Mon Sep 17 00:00:00 2001 From: Semere Meharena Mebrahtom Date: Sun, 19 Jul 2026 14:31:12 +0200 Subject: [PATCH] auto login using getty --- modules/desktop.nix | 2 ++ modules/shell/zsh.nix | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/modules/desktop.nix b/modules/desktop.nix index ba4811f..952d990 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -36,6 +36,8 @@ in security.polkit.enable = true; security.pam.services.swaylock = {}; + services.getty.autologinUser = "${userVars.username}"; + environment.systemPackages = with pkgs; [ pamixer brightnessctl diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index 0410e38..95002a2 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -28,6 +28,22 @@ in dotDir = "/home/${userVars.username}/.config/zsh"; + initContent = '' + # -- GPG / SSH Configuration -- + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + + # Import Wayland environment to systemd for GUI tools (like pinentry-gnome3) + if [ -n "$WAYLAND_DISPLAY" ]; then + systemctl --user import-environment WAYLAND_DISPLAY DISPLAY DBUS_SESSION_BUS_ADDRESS 2>/dev/null + dbus-update-activation-environment --systemd WAYLAND_DISPLAY DISPLAY DBUS_SESSION_BUS_ADDRESS 2>/dev/null + fi + + # Automatically start dwl on TTY 1 + if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then + exec dwl + fi + ''; + history = { size = 10000; save = 10000;