Personal Nix flake for macOS, NixOS, Linux containers, and Asahi NixOS hosts.
| Host | Platform | Role |
|---|---|---|
santibook |
aarch64-darwin |
macOS laptop |
opal |
x86_64-linux |
NixOS host (Minisforum AI X1 Pro) |
jade |
x86_64-linux |
Public VPS running ingress |
lime |
x86_64-linux |
NixOS backup server |
ruby |
x86_64-linux |
Incus VM |
santisasahi |
aarch64-linux |
Asahi NixOS laptop |
make format
make check
make bootstrap
make rebuild
make update
make upgrade
make rekeymake bootstrap supplies the Opal and NixOS cache URLs and signing keys through NIX_CONFIG, replacing stale cache settings for that rebuild. Once that configuration is active, regular make rebuild invocations use the cache automatically.
santisasahi rebuilds use --impure because the Apple Silicon firmware lives outside the flake.
-
Install Xcode CLI tools.
xcode-select --install
-
Install Nix using the Lix installer.
curl -sSf -L https://install.lix.systems/lix | sh -s -- install -
Clone this flake.
git clone https://github.com/santikid/dotnix.git ~/.nix -
Switch to the host configuration.
nix run nix-darwin --extra-experimental-features "nix-command flakes" -- switch --flake ~/.nix#<host>
For opal, follow the mirrored-NVMe installation notes in
hosts/opal/INSTALL.md. The generic single-disk steps
below are for the other NixOS hosts.
Boot the NixOS minimal installer ISO, optionally load a keymap such as loadkeys de, then format and mount the disk:
parted /dev/sda -- mklabel gpt
parted /dev/sda -- mkpart primary 1MiB 512MiB
parted /dev/sda -- mkpart primary 512MiB 100%
parted /dev/sda -- name 1 EFI
parted /dev/sda -- name 2 root
parted /dev/sda -- set 1 boot on
mkfs.fat -F 32 /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/disk/by-partlabel/root /mnt
mkdir /mnt/boot
mount /dev/disk/by-partlabel/EFI /mnt/bootFor a new host, generate hardware config:
nixos-generate-config --root /mntClone and install. When opal is reachable, supply the cache settings explicitly so the initial installation can reuse CI artifacts before the installed configuration takes effect:
git clone https://github.com/santikid/dotnix /mnt/.nix
nixos-install --flake /mnt/.nix#<machine> \
--option extra-substituters http://opal:8180/dotnix \
--option extra-trusted-public-keys 'dotnix:N7VDgNbJ+yj6YV97+97s5HrxQ38+27OSPm17BexG3qA='Asahi installation follows the nix-community/nixos-apple-silicon partitioning flow. Create and mount the root subvolumes:
sgdisk /dev/nvme0n1 -n 0:0 -s
sgdisk /dev/nvme0n1 -p
mkfs.btrfs -L nixos /dev/nvme0n1p5
mount /dev/disk/by-label/nixos /mnt
btrfs subvolume create /mnt/root
btrfs subvolume create /mnt/nix
btrfs subvolume create /mnt/home
umount /mnt
mount -o subvol=root,compress=zstd,noatime /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/{nix,home,boot}
mount -o subvol=nix,compress=zstd,noatime /dev/disk/by-label/nixos /mnt/nix
mount -o subvol=home,compress=zstd,noatime /dev/disk/by-label/nixos /mnt/home
fatlabel /dev/disk/by-partuuid/`cat /proc/device-tree/chosen/asahi,efi-system-partition` EFI
mount /dev/disk/by-label/EFI /mnt/bootInstall with an impurity allowance for host-local firmware:
mkdir -p /mnt/tmp
TMPDIR=/mnt/tmp nixos-install --impure --flake /mnt/.nix#santisasahi