-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Description
Nix itself supports many platforms including FreeBSD and Darwin, however NixOS is Linux exclusive. In the olden days, if someone wanted to try out FreeBSD, they'd have to install the whole system and dual-boot, but with NixOS, it's conceivable that one would be able to install multiple kernels into the same OS installation and switch between them at boot. While Linux applications wouldn't work on, say, GNU HURD, the Nix store would allow multiple versions of the same application where each is compiled for a different kernel. If I'm not mistaken, this already happens for people who share their nix-store between OS installations.
Naturally, porting all of NixOS to alternate kernels would be a monumental task, but I would like to at least throw the idea out there if someone decides to start pursuing it.
Obviously, this would require removing all Linux specific utilities from the core of NixOS, or at least making them optional. The biggest dependency that I can think of is Systemd. Which would make the first step of this task be to make NixOS services agnostic to the init process.
Known tasks. (To be updated with more specifics.)
- Semi-support https://github.com/InitWare/InitWare instead of Systemd
- Add some sort of feature flag to strip of systemd-only features from unit files
- Improve package compatibility across more systems.
- Make sure all core utilities are available for desired kernel or can be replaced by one that is.
- Provide build instructions for kernels other than Linux.
- NetBSD
- builds
- runs
- GNU Hurd, Nixpkgs used to contain something for
- NetBSD
- Rig up booting. @Ericson2314 has no idea how to even break this down.
- Provide configuration.nix switch for selecting kernels.
- Some sort of QEMU smoke test.
(I'm certain the tasks should be broken up smaller, but this is what I can think of right now.)
What do you think? Is this worth pursuing? Is this even feasible?