Story

Show HN: I made a dual-bootable NixBSD (NixOS and FreeBSD) image

jonhermansen Thursday, January 29, 2026

I've been working on getting NixBSD (Nix package manager + FreeBSD) to boot alongside NixOS on a shared ZFS pool. The result is a <2GB disk image you can try in QEMU or virt-manager.

What works:

    - GRUB chainloads FreeBSD's bootloader
    - Both systems share a ZFS pool
    - Everything is defined in a single Nix flake
    - Fully reproducible builds (some dependencies are now cached on Cachix)
Planned:

    - Support native compilation of NixBSD (currently cross-compiled on Linux)
    - Many shortcuts were taken to get this working, needs lots of cleanup
    - Add a semi-automated installer like nixos-wizard
Try it:

    qemu-system-x86_64 -enable-kvm -m 2048 \
      -bios /usr/share/ovmf/OVMF.fd \
      -drive file=nixos.root.img,format=raw
Login: nixos/nixos or root/toor

The hardest parts were getting mounts working at boot, making the bootloader setup idempotent, and debugging early init. This disk image could potentially work on a USB stick with a bit more work.

This is very much experimental. My goal is to eventually produce a proper NixBSD installation ISO and consolidate all configuration into one repository while still consuming upstream NixBSD as a flake.

Download: https://github.com/jonhermansen/nixbsd-demo/releases/tag/bui...

Feel free to leave feedback here or on GitHub! Thanks!

Summary
The article demonstrates how to use NixOS, a Linux distribution, to create a portable and reproducible development environment. It covers the installation process, configuration management, and deployment across different platforms, including BSD-based operating systems.
5 2
Summary
github.com
Visit article Read on Hacker News Comments 2