diff --git a/modules/tahani.nix b/modules/tahani.nix index cbbaa93..2a9761a 100644 --- a/modules/tahani.nix +++ b/modules/tahani.nix @@ -56,8 +56,8 @@ # Auto-start zellij in nushell on tahani (headless server) programs.nushell.extraConfig = '' - if 'ZELLIJ' not-in ($env | columns) { - zellij + if $nu.is-interactive and ('SSH_CONNECTION' in ($env | columns)) and ('ZELLIJ' not-in ($env | columns)) { + exec zellij attach -c } '';