Oceanix, a declarative OpenCore manager in Nix

Hi, I am here to announce oceanix, a OpenCore manager in Nix, in the last couple of days. This is an idea that was in my mind for such a long time. I have been already using it for one of my setups. Here is my config using oceanix.

In case you don’t know what OpenCore is, it is an open-source project to properly boot macOS on non-Mac hardware. But it’s not quite a good experience to config / upgrade your config for OpenCore, so I created oceanix to rescue.

So here are some key features:

  1. Automatic Defaults. Oceanix will read the Sample.plist from the opencore version (package) you specified and configure defaults for many values (like Misc > Boot, NVRAM → Add) accordingly. Thanks to the powerful module system, if a new OC gets released and you update your OC package (which is easy using oceanix), your config will automatically adapt to the latest defaults.
  2. Programmable OpenCore Configuration So basically you can use Nix to write plist. Therefore, you can split up the config.plist into small sections and add comments which make your config more manageable and accessible. You can also put SMBIOS-related info in a single file and encrypt it. If you have multiple machines and setups, Nix allows you to abstract the common parts of those setups. Thanks, Nix!
  3. Flexible Package Management Oceanix comes with a lot of popular kexts and drivers packaged. This means you can upgrade/ downgrade your kexts without going under the " download, unzip, replace" hassle. You can also import folders of your existing collection if you don’t want to package them.
  4. Proper Dependency Resolution Just like ProperTree, oceanix will automatically add your Drivers, Tools, ACPI files, Kexts and resolve Kexts dependency to order them correctly (all done with pure Nix!). Moreover, you can recursively toggle a kexts and its plugins with just foo.Enabled = false.
  5. Reproducible Since it’s using Nix, your config is bit-by-bit reproducible. Enjoy peace of mind.

It’s early and probably has some bugs I didn’t get tested, but it’s working as a charm for me now. In the future, I plan to implement:

  1. Optional ocvalidate so that you always write something correct
  2. Auto OC vaulting to sign the OC and do the vaulting process for you every time you change your config

If you are using OpenCore, I hope you find it interesting and encourage you to try it out. Feel free to comment and file issues. And don’t forget to star!

Hosted by Flying Circus.