feat(system_baseline): optional tmux session on SSH login #122

Merged
Defame1297 merged 5 commits from feat/system-baseline-tmux into main 2026-11-14 19:50:16 +00:00
5 Commits
Author SHA1 Message Date
Defame1297 873a40c48d Merge branch 'main' into feat/system-baseline-tmux
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 28s
Molecule / molecule (pull_request) Successful in 1m28s
2026-11-14 19:48:07 +00:00
Dragonish da3389eac1 fix(system_baseline): keep tmux autostart from ending or swallowing logins
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 21s
Molecule / molecule (pull_request) Successful in 1m30s
Review of #122.

- A failed attach no longer closes the connection: the snippet does not exec tmux, it
  prints a line and leaves the plain shell (a client TERM without terminfo made every
  login fail). A clean detach still ends the connection.
- The snippet acts only for an interactive shell (case $-): a login shell that is not
  interactive, such as `ssh -t host 'bash -lc cmd'`, is left alone. Docs corrected.
- Validation anchors with \Z, so a trailing newline from a YAML block scalar is refused.
  It moves to validate.yml (tag always); argument_specs already covers types.
- Install keys on tmux being in the resolved package list, not a second profile list.
- verify.yml: the snippet does nothing without a terminal, the trailing-newline refusals,
  and the removal path. The vacuous pve assert is gone.
- README and argument_specs: window commands start with a minimal environment (use absolute
  paths), zsh and fish do not read /etc/profile.d, detach ends the connection.
2026-11-14 16:34:14 +00:00
Defame1297 d3d39097b0 Merge branch 'main' into feat/system-baseline-tmux
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 20s
Molecule / molecule (pull_request) Successful in 1m26s
2026-11-14 16:12:31 +00:00
Defame1297 de0d636002 Merge branch 'main' into feat/system-baseline-tmux
Build / build (pull_request) Successful in 11s
Lint / lint (pull_request) Successful in 41s
Molecule / molecule (pull_request) Successful in 1m24s
2026-11-14 14:45:30 +00:00
DragonishandClaude Sonnet 5.5 dcdc9133f6 feat(system_baseline): optional tmux session on SSH login
Build / build (pull_request) Successful in 12s
Lint / lint (pull_request) Successful in 20s
Molecule / molecule (pull_request) Successful in 1m40s
Adds tmux to the ubuntu_lxc and ubuntu_vm profiles and an opt-in
/etc/profile.d snippet that attaches an interactive SSH login to a tmux
session, created with configurable windows when it does not exist.

- system_baseline_tmux_autostart (default false), _session (default main)
  and _windows ([{name, command}]); only ubuntu_lxc and ubuntu_vm install
  the snippet, pve never does, and false removes it.
- profile.d is read only by an interactive login shell, so scp, sftp,
  ssh host command and automation are unaffected. ~/.no-tmux opts a user
  out. ForceCommand is not used: it would affect every session type.
- Names and commands are validated and shell-quoted; the script is
  root-owned. Commands run as the logging-in user and are world-readable,
  so they must hold no secret.
- Molecule converge enables it, verify checks ownership, mode, the attach
  line, the quoting and sh -n.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Q72rsMEKREGMfB9DH3T9mR
2026-11-14 14:26:19 +00:00