logo hsb.horse
← Back to blog index

Blog

M4 Mac mini Setup

I found an M4 Mac mini heavily discounted in a strange Amazon sale, used up some saved points, and bought it. This is a record of the setup work I did while keeping future NixOS-based management in mind.

Published: Updated:

Why I Bought It

It was cheap, and shipping was dramatically faster than buying from Apple directly. At that point it felt inevitable. My only real complaint is that I did not customize the configuration, but I bought it at a discount anyway, and if I decide I want a custom spec later I can just customize the likely upcoming M5 Mac mini instead.

https://www.gizmodo.jp/2026/02/macmini_nazo.html

Things I Want to Do Later

  • Manage it with NixOS

Things I Will Not Do

  • I will not try to unify it with my main machine because I want to use them differently
  • I also will not use my dotfiles because that setup only splits between personal/work and would be overkill on this machine

Software to Install

  • Homebrew
  • Raycast
  • Ghostty
  • VS Code
  • Browser (Chrome)

Work Log

Update macOS

Updated from macOS Tahoe 26.1 to the latest macOS Tahoe 26.3.

Prepare Hardware

This time I bought the UGREEN docking station and stand for Mac mini M4 to use as a hub and stand for the Mac mini.

SSD prices are still high enough that I did not want to buy one yet, so for now I decided to get by with spare SD cards, a microSD card, and a USB SSD I already had.

  • SSD-PST1.0U3BA/D: 1TB USB SSD by BUFFALO
  • KLMEA512G: 512G microSD card by KIOXIA
  • KTHN-NW512G: 512G SD card by KIOXIA

Reformat the SD/microSD cards to APFS

Since I was already setting things up, I decided to make them dedicated macOS cards. My requirements were:

  • It is fine if they fail
  • They are mainly for short-lived data I/O. Important data stays on SSD

Disk Utility cannot change SD cards to APFS in this case, so I used the terminal.

  1. Output the disk list
Terminal window
diskutil list
  1. Once you identify the target, erase and create it with eraseDisk

Replace X with the disk number.

Terminal window
diskutil eraseDisk APFS|APFSX "${DISK_NAME}" /dev/diskX

Install Homebrew

  1. install
Terminal window
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  1. setup
Terminal window
echo 'eval "$(/opt/homebrew/bin/brew shellenv zsh)"' > ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv zsh)"
  1. check
Terminal window
brew --version
# Homebrew 5.X.X

Install Various Tools Through brew

  1. ollama
brew install ollama