Fix screen auto-start via SSH

This commit is contained in:
2026-02-08 13:58:13 +00:00
parent ce0bb160cc
commit 334f31008d
2 changed files with 4 additions and 4 deletions

View File

@@ -6,12 +6,12 @@ export PATH="${HOME}/bin:${PATH}"
# screen session or start a new, UTF-8 capable.
#
# Since we exec right afterwards, there's no point in setting this shell up.
case "$0" in -*)
if [[ -o login ]]; then
[ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ] && \
[ -z "$STY" ] && \
which screen 2>/dev/null && \
exec screen -URR
esac
fi
HISTFILE=~/.zsh_history
# History in the file

View File

@@ -9,13 +9,13 @@
programs.zsh = {
enable = true;
initContent = ''
. ~/dotfiles/migrated/.zshrc
# Outside NixOS, we need to load this manually. Same on MacOS, if
# /etc/zshrc is reset to its default content (post-upgrade).
if [ -r /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
fi
. ~/dotfiles/migrated/.zshrc
'';
};