Draft: nix-darwin module
Fixes #409.
The home manager module covers most cases on Darwin, but does not cover headless devices as agents don't run unless a user session exists. This is a (draft) small copy-paste job of the home-manager integration which is enough to get nix-darwin working.
I'd like feedback on:
- What tests would be useful/how this should be tested?
- What sort of code sharing should occur between this and normal Nix?
- Any documentation that'd be nice?
and honestly anything else.
I'd like feedback on:
* What tests would be useful/how this should be tested?
Automatic tests in the CI would be great, but I don't know how this is done on macOS. I do have a macos builder in buildbot, if that helps.
* What sort of code sharing should occur between this and normal Nix?
I don't think we need to butcher the nixos options to share them between platforms. It's fine to just share the go code.
* Any documentation that'd be nice?
Yes, would be. I assume it's not that different from other platforms?
and honestly anything else.
I've tried out this PR. It sort of works (except for setting right permissions, per my comment above), but when activation fails there's no indication on the nix-darwin run side. You have to catch those silently ignored errors by tailing /var/log/sops.log.
I can now also finally properly review macOS: https://github.com/Mic92/dotfiles/tree/main/darwin
Hi, I'm really looking forward using the nix-darwin module, because I want to use some sensitive information in my darwin configuration and assume without this module there is no way to do that currently.
I would be very happy if you could share something on the current status of this :)