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/toorThe 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!
Ericson2314•4h ago
Multiple kernels, one filesystem is the dream. We'll restore competition between kernels by lowering switching costs to zilch, finally solving the problem in the infamous Rob Pike paper (which is that the switching costs make the path dependency of "just keep working on the same legacy-constrained OS" too powerful).
FreeBSD is just the first non-Linux kernel to be done this way --- OpenBSD has been NixOS-ified too (a bit bitrotted atm though) too. Your favorite kernel can be NixOS-ified too!
jonhermansen•4h ago
Thank you for supporting and encouraging me to push the envelope further.
NixBSD was already in great shape, I just wanted to add a little bit of polish and make it easier for people to consume. I hope that the demo may help get others interested and to get set up locally.
I would like to add support for additional kernels. I heard that NetBSD can also boot from ZFS, but I haven't worked out all the details yet. I might like to experiment with that some time.
I've also been keeping an eye on Cygwin support, and it would also be quite interesting to NixOS-ify ReactOS :p