nixos/bash: Reset title bar when logging out of remote NixOS system

This fixes an issue where the title bar is permanently clobbered when
you SSH into a remote NixOS system and then log out.  The solution is
to reset the title bar upon logout.
This commit is contained in:
Gabriella Gonzalez 2025-03-29 18:08:20 -07:00 committed by gabby
parent b1bcd7acba
commit 1a01e367f6

View File

@ -112,7 +112,14 @@ in
};
logout = lib.mkOption {
default = "";
# Reset the title bar when logging out. This protects against a remote
# NixOS system clobbering your local terminal's title bar when you SSH
# into the remote NixOS system and then log out.
#
# For more details, see: https://superuser.com/a/339946
default = ''
printf '\e]0;\a'
'';
description = ''
Shell script code called during login bash shell logout.
'';