sops-nix icon indicating copy to clipboard operation
sops-nix copied to clipboard

Draft: nix-darwin module

Open j-baker opened this issue 1 year ago • 4 comments

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.

j-baker avatar May 05 '24 09:05 j-baker

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.

Mic92 avatar May 09 '24 08:05 Mic92

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.

srid avatar Jun 19 '24 02:06 srid

I can now also finally properly review macOS: https://github.com/Mic92/dotfiles/tree/main/darwin

Mic92 avatar Jun 30 '24 07:06 Mic92

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 :)

niklasravnsborg avatar Sep 02 '24 06:09 niklasravnsborg