Skip to content

Scripts Overview

All scripts live in the scripts/ directory of the repository. They are numbered to indicate the recommended run order.

Run Order

ScriptPurposeRun As
00-setup-vault.shFirst-time LUKS2 encrypted vault creationbash
01-thermal-setup.shCritical — fix fan/thermal controlsudo bash
02-wifi-firmware.shWi-Fi & Bluetooth firmware managementbash
03-optimise.shSystem-wide post-install optimisationsudo bash
04-bootloader.shLimine management & rEFInd dual-bootsudo bash
05-mount-vault.shUnlock and mount the code vaultbash
06-unmount-vault.shLock and unmount the code vaultbash

Design Principles

All scripts follow these conventions:

  • #!/usr/bin/env bash — always run under bash, never rely on the calling shell
  • set -euo pipefail — exit on error, undefined variables, or pipe failures
  • find instead of globs — glob patterns (applesmc.*) fail in fish shell when called via sudo bash; all path discovery uses find
  • No sudo -u for AUR helpersparu/yay must run as the normal user; calling them via sudo -u inside a sudo session hangs indefinitely
  • Idempotent — safe to run multiple times; existing configs are backed up, not overwritten blindly
  • Colour output — consistent [OK], [INFO], [WARN], [ERROR] prefixes

Shell Compatibility Note

Scripts are invoked with sudo bash scripts/01-thermal-setup.sh — always specify bash explicitly. If you use fish shell and run sudo scripts/01-thermal-setup.sh without the bash, fish will try to execute it directly and glob patterns may still cause issues even with the shebang present.