linux-m1 Apple Silicon NixOS install checklist
linux-m1 Apple Silicon NixOS install checklist
linux-m1 Apple Silicon NixOS install checklist
linux-m1 Apple Silicon NixOS install checklist
linux-m1 Apple Silicon NixOS install checklist
linux-m1 Apple Silicon NixOS install checklist
linux-m1 Apple Silicon NixOS install checklist
linux-m1 Apple Silicon NixOS install checklist
Target: Apple Silicon MacBook Pro (mika-m1) with macOS kept in place and a separate Linux install named linux-m1.
- 2026-04-29: Temporary Fedora Asahi Remix 44 install is in place.
- 2026-04-29: OpenZFS
zfs-2.4.1is the source tree to use for Linux6.19on this machine. - Keep this section updated with commands that actually worked and any machine-specific deviations.
- 2026-04-29:
zfs-2.4.1configures cleanly against6.19.13-400.asahi.fc44.aarch64+16k, and OpenZFSMETAalready listsLinux-Maximum: 6.19. - 2026-04-29: The module build for
zfs-2.4.1fails inmodule/zfs/vdev_raidz_math_aarch64_neon_common.hwithinvalid hard register usage between earlyclobber operand and input operand. - 2026-04-29: Current OpenZFS
masterfails with the same AArch64 NEON register allocation error. - 2026-04-29: nixpkgs
zfs_2_4andzfs_unstableboth point at OpenZFS2.4.1;pkgs/os-specific/linux/zfs/generic.nixcarries no extra ZFS patches. - 2026-04-29: Btrfs is now the install path for the temporary Linux root; ZFS is deferred until there is a compiler-side fix.
- 2026-04-29: The final NixOS host in the repo is now
linux-m1, and it imports the Asahi support module fromnix-community/nixos-apple-silicon. - 2026-04-29: The Btrfs layout is
@,@home, and@nix;/nixis mounted withcompress=zstd:15. - 2026-04-29: The repo now carries the
linux-m1host config instead of relying on the generated/mnt/etc/nixostree. - 2026-04-29:
sccachewas deferred onlinux-m1; the staging disk is too small to justify a persistent local compiler cache. - 2026-04-29:
linux-m1is being stripped down to the basics;cli-internet.nix,cli-media.nix,codex.nix, andmempalace-plugins.nixare excluded from the host for now. - 2026-04-29:
sccacheis staged in thelinux-m1NixOS config and the host setsRUSTC_WRAPPER=sccachefor Rust builds.
- 2026-04-29: Repo source of truth is /home/mjc/nixos; linux-m1 is the NixOS host and mika-m1 remains the Darwin host.
- 2026-04-29: Temporary Fedora Asahi Remix 44 is the staging OS.
- 2026-04-29: The Asahi UEFI environment was installed from macOS with the Asahi installer, choosing Install an OS into free space and UEFI environment only.
- 2026-04-29: Final Linux storage is Btrfs, not APFS or ZFS.
- 2026-04-29: Internal SSD layout: Asahi EFI partition at /dev/nvme0n1p8 mounted at /mnt/boot; final Btrfs root at /dev/nvme0n1p12.
- 2026-04-29: Btrfs subvolumes are @ for /, @home for /home, and @nix for /nix.
- 2026-04-29: Mount options are compress=zstd,noatime,space_cache=v2,discard=async for / and /home, and compress=zstd:15,noatime,space_cache=v2,discard=async for /nix.
- 2026-04-29: OpenZFS 2.4.1 is the first release that advertises Linux 6.19; 2.4.0 tops out at 6.18, and 2.3.4 tops out at 6.16.
- 2026-04-29: OpenZFS 2.4.1 and upstream master both fail on this Asahi GCC 15 toolchain with invalid hard register usage between earlyclobber operand and input operand in module/zfs/vdev_raidz_math_aarch64_neon_common.h.
- 2026-04-29: nixpkgs zfs_2_4 and zfs_unstable both point at 2.4.1, and pkgs/os-specific/linux/zfs/generic.nix carries no extra ZFS patching.
- 2026-04-29: The NixOS host config now lives in the repo and imports nix-community/nixos-apple-silicon; the live /mnt/etc/nixos tree is just the staging copy.
- 2026-04-29: sccache was considered but deferred because the staging disk is only about 100 GB and the cache budget is too tight.
- Keep macOS bootable.
- Use the Asahi installer only to create the Apple Silicon UEFI boot environment.
- Install NixOS alongside macOS without needing a USB stick.
- A full backup.
- Free space on the internal SSD for the Linux root partition.
- The Asahi installer from macOS.
- A temporary Linux environment on the same machine. The no-USB guide assumes Fedora Asahi Remix 44.
From macOS Terminal:
curl https://alx.sh | shChoose:
- Resize macOS to leave enough free space for Linux.
Install an OS into free spaceUEFI environment only
That step does not replace macOS. It creates the boot plumbing NixOS needs on Apple Silicon.
Because you do not have a USB drive handy, use the Asahi installer again to place Fedora Asahi Remix 44 in the space you reserved.
The no-USB guide’s sequence is:
- keep the UEFI environment you already created
- install Fedora Asahi Remix into the free space
- boot Fedora
This is a temporary staging OS. You will replace it with NixOS.
On Fedora, install Nix for your normal user:
curl -L https://nixos.org/nix/install | sh
export PATH="$PATH:$HOME/.nix-profile/bin"Then move to a NixOS channel and install the NixOS install tools:
nix-channel --add https://nixos.org/channels/nixos nixpkgs
nix-channel --update
nix-env -f '<nixpkgs>' -iA nixos-install-toolsIf you are using flakes end to end, you can skip the channel setup and install the tools from your normal flake workflow. Do not overthink the Fedora side here: the important part is that the staging OS is Fedora Asahi Remix 44 with the Asahi kernel and kernel-16k-devel available.
Use Btrfs for the Linux root partition on the temporary Fedora install. Keep it simple:
sudo dnf install -y btrfs-progsThis is only for the Linux root filesystem. The Asahi-created EFI partition still handles the boot path on Apple Silicon.
Create the Linux root partition in the reserved space, then format it as Btrfs:
sudo mkfs.btrfs -L nixos /dev/nvme0n1p12Mount it at /mnt, then create the subvolume layout you want to carry into NixOS:
sudo mount /dev/nvme0n1p12 /mnt
sudo btrfs subvolume create /mnt/@
sudo btrfs subvolume create /mnt/@home
sudo btrfs subvolume create /mnt/@nix
sudo umount /mnt
sudo mount -o subvol=@,compress=zstd,noatime,space_cache=v2,discard=async /dev/nvme0n1p12 /mnt
sudo mkdir -p /mnt/{home,nix,boot}
sudo mount -o subvol=@home,compress=zstd,noatime,space_cache=v2,discard=async /dev/nvme0n1p12 /mnt/home
sudo mount -o subvol=@nix,compress=zstd:15,noatime,space_cache=v2,discard=async /dev/nvme0n1p12 /mnt/nixMount the EFI partition created by Asahi at /mnt/boot:
sudo mount /dev/nvme0n1p8 /mnt/bootIf you do not know the partition UUID yet, get it from:
cat /proc/device-tree/chosen/asahi,efi-system-partitionFollow the Apple Silicon guide carefully. The important parts are:
- Do not touch the macOS recovery partitions or the existing GPT layout outside the free space.
- Create a Linux root partition in the free space.
- Format it as Btrfs.
- Mount it at
/mntwith the subvolume layout you want to keep. - Mount the EFI system partition created by the Asahi installer at
/mnt/boot. - Do not create a second EFI partition; the Asahi installer already made the one NixOS should boot from.
- On this machine,
nvme0n1p12is the final Btrfs partition andnvme0n1p8is the Asahi EFI partition.
The guide uses the firmware-provided partition UUID from:
cat /proc/device-tree/chosen/asahi,efi-system-partitionFrom the Fedora shell:
sudo nixos-generate-config --root /mntThen add the Apple Silicon support module as the guide describes. The upstream layout is:
./hardware-configuration.nix./apple-silicon-support
Also set:
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;The no-USB guide uses:
sudo groupadd -g 30000 nixbld
sudo useradd -u 30000 -g nixbld -G nixbld nixbld
time sudo PATH="$PATH" ~/.nix-profile/bin/nixos-install -I ~/.nix-defexpr/channels --root /mntSet a root password when prompted.
- Reboot.
- The bootloader should now present the NixOS generation.
- Log in as root.
- Verify networking and the desktop environment.
Once the installed system is up, switch from the temporary config to your real flake:
sudo nixos-rebuild switch --flake ~/cfg/nixos#linux-m1That host is already scaffolded in your repo and is the Linux-side twin of mika-m1 on macOS.
If your router or DHCP setup still collides with macOS, pin a locally administered MAC in your Linux host config after you know the real interface names:
networking.interfaces.<iface>.macAddress = "02:11:22:33:44:55";Use a 02:-prefixed address for a locally administered MAC.
If you need to inspect files on the macOS APFS volumes from Fedora or NixOS, treat that as read-only by default.
Use APFS tools that mount read-only unless you have a very specific reason to experiment:
apfs-fusefor read-only access- experimental
linux-apfs-rwif you are intentionally testing write support and accept corruption risk
Do not use APFS as the Linux root or staging filesystem.
- macOS stays on the machine and remains bootable.
- The Asahi installer is only the boot/UEFI bootstrap for Apple Silicon.
- The Apple Silicon support module is still required for the Linux side.
- ZFS is currently blocked by the AArch64 compiler path on this toolchain, so Btrfs is the practical staging filesystem.
- https://wiki.nixos.org/wiki/NixOS_on_ARM/Apple_Silicon_Macs
- https://github.com/nix-community/nixos-apple-silicon/blob/main/docs/uefi-standalone.md
- https://gist.github.com/pat42smith/2efc9eaec2ca1ae5bdc79c2acfdaf858
- https://github.com/AsahiLinux/asahi-installer
- openzfs/zfs#16429
- https://openzfs.github.io/openzfs-docs/Getting%20Started/Fedora/index.html