From e5fb44c367efc6b74dfd94375c1a802f6748925c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Porta?= Date: Thu, 16 Jul 2026 19:11:46 +0000 Subject: [PATCH] cage foot --- hosts/writter-deck/home.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hosts/writter-deck/home.nix b/hosts/writter-deck/home.nix index 00ba03c..4e60eb0 100644 --- a/hosts/writter-deck/home.nix +++ b/hosts/writter-deck/home.nix @@ -124,7 +124,13 @@ in bash = { enable = true; profileExtra = '' - if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" = "1" ]; then + # Auto-launch cage + foot when logging in on tty1 (skip over SSH). + # If cage exits, you drop back to the login shell on tty1 instead + # of being stuck in a restart loop. + if [ "$(tty 2>/dev/null)" = "/dev/tty1" ] \ + && [ -z "$WAYLAND_DISPLAY" ] \ + && [ -z "$CAGE_RUNNING" ]; then + export CAGE_RUNNING=1 export WLR_RENDERER=pixman export XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)} exec cage -- foot