News for hackers. Stuff that matters.
Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Tuesday July 13, 2021 @04:15PM (#27825732)
I run the opposite of this, and run Linux with Nix on a Mac, and run macOS in VM with VFIO passthrough for macOS development.

I've found that native Linux makes for an excellent dev environment.

Re:macOS Nix setup: an alternative to Homebrew (2020) by philsnow on Tuesday July 13, 2021 @05:00PM (#27826261)
You're running linux (with nix installed) on the bare metal of a mac, and then a VM on top of that running macos (with VFIO passthrough so it's not dog-slow?), is that right?

Performance is pretty reasonable? APFS works fine in this setup? No gotchas with drive encryption? ... actually, if your machine does use drive encryption, which is doing it, linux or mac? I don't know enough about mac hardware to know if there is some mac boot environment that handles encryption and then hands off to the OS (be it macos or linux).

Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Wednesday July 14, 2021 @05:01PM (#27838392)
> You're running linux (with nix installed) on the bare metal of a mac, and then a VM on top of that running macos (with VFIO passthrough so it's not dog-slow?), is that right?

You got it.

> Performance is pretty reasonable? APFS works fine in this setup?

Works well enough for my use cases. It's certainly less slow and fragile than running Linux in a VM via macOS.

APFS works fine in the VM, but I use HFS+ just because there are more mature tools to poke at HFS+ images than APFS, right now. The APFS FUSE drivers work well and support reading and writing[1]. There's a closed source driver that supports writing and encryption, though[2].

> No gotchas with drive encryption? ... actually, if your machine does use drive encryption, which is doing it, linux or mac? I don't know enough about mac hardware to know if there is some mac boot environment that handles encryption and then hands off to the OS (be it macos or linux).

I don't use T2 disk encryption, I just let Linux handle partition encryption. Apparently there's support here[3] for it, though.

[1] https://github.com/sgan81/apfs-fuse

[2] https://www.paragon-software.com/us/business/apfs-linux/

[3] https://wiki.t2linux.org/

Re:macOS Nix setup: an alternative to Homebrew (2020) by sureglymop on Tuesday July 13, 2021 @05:34PM (#27826589)
I've had a vfio setup for a year now, passing various hardware to Windows and Linux VMs but finally I just converted it to a regular dual boot setup.

I figured since I am passing through all this hardware anyway it might as well all directly access it.

Now with SR-IOV that would be an entirely different story.

Re:macOS Nix setup: an alternative to Homebrew (2020) by fouc on Wednesday July 14, 2021 @12:01AM (#27829584)
do you run X windows in this setup? Any issues with getting all the drivers working for trackpad, sound, wifi, etc? That's what has me hesitating to bother trying linux as my host OS on a 2015 MBP
Re:macOS Nix setup: an alternative to Homebrew (2020) by heavyset_go on Wednesday July 14, 2021 @12:20AM (#27829688)
2015 MBPs are great Linux machines, everything is supported except for some webcams, but there are out of tree drivers that work perfectly. Sound via Pulseaudio or Pipewire works well out of the box, too.

I run Wayland, and libinput[4] gives you pretty much all of the trackpad features and gestures you get in macOS like adaptive acceleration, tapping, multitouch gestures etc. Xorg works well, as well, except its gesture support is limited compared to Wayland's.

Depending on the model, WiFi has open source and closed source driver support that both work well, and have Bluetooth support.

This is a good reference to see how well your model is supported on Linux[1]. This project will remap your keyboard shortcuts to match the ones you're familiar with from macOS[2].

I've also posted about making Linux and Plasma Desktop act like macOS on HN[3].

[1] https://github.com/Dunedan/mbp-2016-linux

[2] https://github.com/rbreaves/kinto

[3] https://news.ycombinator.com/item?id=25473702

[4] https://wayland.freedesktop.org/libinput/doc/latest/features...