Files
ansible/roles/pi_modern_shell_env
Martin Bauer a0546f5fa6 Recover from half-done installs and missing devices instead of failing for good
- pi_shairport: on trixie systemd.pc moved into systemd-dev, so configure found no
  unit directory and `make install` died on an empty `install -d` - after it had
  already installed the binary. `creates:` then saw the binary and never retried, and
  the next tasks failed on the missing unit. Install systemd-dev on trixie, and key
  `creates:` on the unit file.
- pi_irserver: with the IRTrans receiver unplugged at boot, irserver exited at once and
  stayed failed. Restart it every 10s with no start limit until the device shows up.
- pi_modern_shell_env: get_url sent a conditional request to the oh-my-posh CDN on every
  run, so a TLS handshake timeout there failed the whole play with the binary already
  installed. Only download it when it is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 21:22:05 +02:00
..
2026-09-10 21:33:19 +02:00

pi_modern_shell_env

Installs modern CLI tooling (fish, ripgrep, fd, bat, fzf, zoxide, lsd, tmux) plus an oh-my-posh prompt for the login user on iot Pi hosts, and makes fish the default login shell. Purely a convenience layer for interactive SSH sessions into otherwise single-purpose appliance boxes — does not affect any of the audio/sensor services these hosts run.

The oh-my-posh theme (files/ohmyposh.json) and its fish vi-mode integration (templates/config.fish.j2) are copied from the same setup used in ~/nixconfig's home-manager config (homeManagerModules/cli/modern-cli.nix/ohmyposh.json), so the prompt looks and behaves the same on the desktop and on these Pis. If that nixconfig theme changes, re-sync files/ohmyposh.json here by hand — the two aren't linked.

Key vars:

  • pi_modern_shell_env_target_user — user to configure (defaults to main_user, falling back to root).
  • pi_modern_shell_env_set_default_shell — whether to chsh the target user to fish (default true).