24 Commits

Author SHA1 Message Date
05a422376f clean up 2026-06-08 22:00:31 +10:00
bc3ab33c0a fix socket path 2026-06-08 21:47:48 +10:00
c0c25c44b8 fix env population 2026-06-08 21:46:59 +10:00
07d9d6364e Remove idle-battery-suspend.sh from stage 06 2026-06-08 21:10:40 +10:00
99c18198f4 Drop swayidle and mempi-sync service references 2026-06-08 21:09:41 +10:00
59dd65950d Fix SSH agent and systemd service race conditions
- bw-ssh-keys.service: use ssh-agent.service, add SSH_AUTH_SOCK env
- Stage 08: enable ssh-agent.socket, mask gcr-ssh-agent before services
- Stage 11: remove SSH agent section (moved to stage 08 for ordering)
- Stage 09: remove stale bw-load-ssh autostart config
- .zshrc: export SSH_AUTH_SOCK to match OpenSSH agent socket
- Remove config/autostart/ (no longer needed)
- porridge daemon: no longer exits on missing API key;
  add SIGHUP handler for live config reload
2026-06-08 21:08:16 +10:00
1cc2a52a17 feat: add system package upgrade to stage 00
- Add PKG_UPGRADE variable to lib/distro.sh:
  - Debian: sudo apt upgrade -y
  - Fedora: sudo dnf upgrade -y
- Export PKG_UPGRADE so stage scripts can use it
- Add upgrade step to 00-envcheck.sh after the existing cache update
  - Errors are non-fatal (|| warn) to handle fresh installs gracefully
2026-06-07 17:06:19 +10:00
56d84b5ffd minor edits 2026-06-07 16:22:08 +10:00
e5b0bc9e0d move quick start script to tmp folder 2026-06-07 16:21:56 +10:00
beba5dd350 README: fix repo name linux-provision -> linux-provisioning 2026-06-07 15:39:16 +10:00
2ee054bd77 README: switch to self-hosted Gitea archive URL 2026-06-07 15:38:05 +10:00
a79d2b3fa2 README: use curl+tar zip download instead of git clone
Works on a fresh machine with no credentials or SSH keys configured.
GitHub serves public archives without authentication.
2026-06-07 15:37:01 +10:00
1b4dac7b06 update git path 2026-06-07 15:34:13 +10:00
5e75868df7 README: add one-liner quick start; remove stale zshrc.local.example refs 2026-06-07 15:32:29 +10:00
a249dec1ba Revert gitconfig/TODO/bw-login redactions; remove zshrc.local.example
Public key, name, email, and self-hosted URLs are fine to publish.
Remove config/shell/zshrc.local.example instead of genericizing it —
it contained personal infrastructure details with no value to others.
2026-06-07 15:23:53 +10:00
3c6ca17a8b Redact personal data before publishing as public repo
- config/git/gitconfig: replace real name, email, SSH signing key, and
  self-hosted git credential URL with placeholder values

- stages/06-scripts.sh: remove hardcoded personal email from bw login;
  CLI prompts interactively

- config/shell/zshrc.local.example: replace personal server URLs
  (Nextcloud, LiteLLM proxy), university email address, institution-
  specific Canvas LMS URL, and identifying Canvas key prefix with
  generic example.com placeholders

- TODO.md: replace personal email and Nextcloud URL in code examples
  with generic placeholders

- stages/07-uv-projects.sh: remove private org name from comment
2026-06-07 15:20:56 +10:00
5f8640c057 Simplify and clean up provisioning scripts
- lib/distro.sh: add DISTRO_CODENAME from VERSION_CODENAME; remove
  unused REPO_ADD_RPM variable; export DISTRO_CODENAME

- stages/01-repos.sh: replace repeated '. /etc/os-release' subshell
  calls with $DISTRO_CODENAME in Docker and Tailscale repo lines

- stages/00-envcheck.sh: combine four mkdir -p calls into one

- stages/02-packages.sh: remove identical if/else branches in fd
  symlink block; both branches were the same command

- stages/03-toolchains.sh: set NVM_DIR once before the if/else instead
  of twice; remove dead commented-out duplicate curl line

- stages/04-shell.sh: capture $(date +%Y%m%d) into _bak_date once per
  backup and reuse in cp and warn to avoid redundant forks

- stages/06-scripts.sh: split 'export VAR=$(cmd)' into assignment +
  export to correctly propagate errors under set -euo pipefail

- stages/07-uv-projects.sh: remove unused has_package_json field (always
  false, never read); fix stage completion message 06 -> 07

- stages/08-systemd.sh: remove mempi-sync.timer (deploy, enable, header
  comment); deploy mempi-sync.service only

- stages/09-desktop.sh: remove duplicate mkdir -p in COSMIC section;
  remove unused repo_url parameter from install_nerd_font()

- stages/12-other-apps.sh: replace manual distro branch for Nextcloud
  with pkg_install_mapped

- config/scripts/bw-load-ssh.sh: split 'export BW_SESSION=$(cat ...)'
  into assignment + export

- config/systemd/mempi-sync.timer: delete file
2026-06-07 15:18:12 +10:00
2ca9a2bdef Fix script file permissions (644 → 755 for executables)
All shell scripts and config files should be executable (755)
for direct invocation. No content changes.
2026-06-07 14:34:51 +10:00
d53e4692a9 Add desktop autostart and more applications
- stages/09-desktop.sh: new autostart section — copies .desktop files
  for Firefox, Ghostty, Nextcloud, Obsidian, Thunderbird into
  ~/.config/autostart/ so they launch at login
- stages/12-other-apps.sh: add Thunderbird, VirtualBox (Fedora via
  RPM Fusion), Zoom (via Flatpak); fallback Signal to Flatpak
  (no official RPM repo); remove FreeRDP (not needed on Fedora)
2026-06-07 14:34:31 +10:00
f0e18fda45 Harden scripts for non-interactive provisioning
- config/scripts/bw-load-ssh.sh: add ssh-agent retry loop (graphical
  session may not be ready when systemd fires); use process substitution
  instead of pipe to avoid subshell + set -e issues with LOADED counter
- stages/05-git.sh: remove interactive SSH key generation prompt (keys
  come from Bitwarden); pre-accept GitHub host key via ssh-keyscan
  to avoid first-connect prompt during git clone
- stages/04-shell.sh: add sudo chsh fallback (chsh may fail in
  non-interactive provisioning without PAM auth)
2026-06-07 14:34:25 +10:00
c7845fd04d Set personal git identity, fix zshrc theme, improve bw-ssh service
- config/git/gitconfig: real name, email, and SSH signing key
- config/shell/zshrc: fix typo 'powerlevel10zsh' → 'powerlevel10k'
- config/systemd/bw-ssh-keys.service: depend on graphical-session
  instead of network (ssh-agent starts with session); add explicit
  PATH so bw and jq are found; add RemainAfterExit=yes
  (avoids restart loop on oneshot services)
2026-06-07 14:34:18 +10:00
5a44aaecb0 Fix Fedora DNF5 compatibility and distro-specific packages
Key changes:
- lib/distro.sh: replace REPO_ADD_RPM variable with repo_add_rpm()
  function (DNF5 changed 'config-manager --add-repo' to
  'config-manager addrepo --from-repofile=')
- 01-repos.sh: use repo_add_rpm function; add Ghostty COPR for
  Fedora; remove Signal RPM repo (no official one — use Flatpak)
- 02-packages.sh: lowercase 'development-tools' group for DNF5;
  add python3-devel (needed for native extensions like evdev);
  swap ffmpeg-free → ffmpeg via RPM Fusion for full codec support;
  use tuned (preinstalled on Fedora) instead of TLP
- 11-tweaks.sh: conditional power management — TLP on Debian,
  tuned on Fedora
2026-06-07 14:34:12 +10:00
7699d71d4e Reorder stages: scripts before uv-projects
Swap stage 06 and 07 so that custom scripts (Bitwarden SSH loader,
custom binaries) are deployed before git clone operations that
need SSH keys.

- Renamed 06-uv-projects.sh → 07-uv-projects.sh
- Renamed 07-scripts.sh → 06-scripts.sh
- Updated provision.sh STAGES array and README
- Updated stage reference numbers in 08-systemd and 09-desktop
- Removed mempi-sync.timer (not needed without automated refresh)
2026-06-07 14:34:05 +10:00
180c5838ea Initial commit: linux-provision repo
Distribution-agnostic provisioning script that sets up a new Linux machine
(Detected via lib/distro.sh - supports Debian/Ubuntu/Pop and Fedora families).

13 stages covering:
- System packages, external repos, toolchains (nvm, uv, Python)
- Shell config (zsh, oh-my-zsh, p10k), git, SSH
- Custom uv tools from ~40 git repos
- Desktop config (keybindings, hotkeys, ghostty, fonts)
- Docker, system tweaks, browser/app installs
- Custom systemd user services (porridge, swayidle, mempi-sync, etc.)
- API keys loaded from Bitwarden at shell startup
2026-06-05 21:22:44 +10:00