homeserver: disable auto login and zellij only attach on ssh connection
This commit is contained in:
parent
b566cdb15c
commit
0f56e29da7
|
@ -27,6 +27,7 @@ in
|
||||||
if cfg.autoAttach then
|
if cfg.autoAttach then
|
||||||
/*bash*/
|
/*bash*/
|
||||||
''
|
''
|
||||||
|
if [[ ! -z "$SSH_CLIENT" ]]; then
|
||||||
if [[ -z "$ZELLIJ" ]]; then
|
if [[ -z "$ZELLIJ" ]]; then
|
||||||
ZJ_SESSIONS=$(zellij list-sessions --no-formatting)
|
ZJ_SESSIONS=$(zellij list-sessions --no-formatting)
|
||||||
NO_SESSIONS=$(echo "$ZJ_SESSIONS" | wc -l)
|
NO_SESSIONS=$(echo "$ZJ_SESSIONS" | wc -l)
|
||||||
|
@ -42,13 +43,16 @@ in
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
/*bash*/ ''
|
/*bash*/ ''
|
||||||
|
if [[ ! -z "$SSH_CLIENT" ]]; then
|
||||||
if [[ -z "$ZELLIJ" ]]; then
|
if [[ -z "$ZELLIJ" ]]; then
|
||||||
zellij attach -c default
|
zellij attach -c default
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
user = {
|
user = {
|
||||||
name = "homeserver";
|
name = "homeserver";
|
||||||
fullName = "Homeserver";
|
fullName = "Homeserver";
|
||||||
getty.autoLogin = true;
|
getty.autoLogin = false;
|
||||||
};
|
};
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue