Nix on macOS | 1179 Members | |
| “There are still many issues with the Darwin platform but most of it is quite usable.” — http://yves.gnu-darwin.org | 193 Servers |
| Sender | Message | Time |
|---|---|---|
| 9 Jan 2026 | ||
| 05:49:09 | ||
| huh what gives?
| 15:38:30 | |
my outer shell is zsh, the nix-shell is bash, but calling bash directly doesn't add whatever that suffix is, so it doesn't look like a shell thing | 15:39:31 | |
| this divergence also doesn't show up on my nixos | 15:39:49 | |
| so maybe it's a nix+mac or nix-darwin thing? | 15:40:01 | |
| discovered a catastrophic bug in gpg-agent for macos on home-manager | 16:10:52 | |
| gpg-agent has a core problem that goes upstream and means that gpg-agent fundamentally doesnt work on darwin in supervised mode adn the launchd agent is useless | 16:11:28 | |
| perhaps MacGPG has patches for this or at least a workaround? that’s what I use and gpg-agent runs automatically there | 16:16:37 | |
| one part of it is having a wrapper to get the sockets
| 16:16:37 | |
| perhaps it does | 16:16:46 | |
| it does not | 16:17:12 | |
| https://github.com/search?q=repo%3AGPGTools%2FMacGPG2%20launch_activate_socket&type=code | 16:17:16 | |
| this function needs to be called to get the sockets | 16:17:26 | |
| because otherwise it cant get the sockets from launchd | 16:18:07 | |
| right, they have a launch agent for killing gpg-agent when the user logs out instead | 16:19:08 | |
| I wonder how they set it up | 16:19:15 | |
| still doesnt properly manage the sockets tho | 16:19:35 | |
| utterly a hack | 16:19:40 | |
| mhm | 16:19:50 | |
| additionally this does nothing https://github.com/nix-community/home-manager/blob/0e4217b2c4827e71e2e612accccb01981c16afda/modules/services/gpg-agent.nix#L451-L453 | 16:21:03 | |
| as the names are far not what gpg actually wants | 16:21:20 | |
| nor does it know how to get them | 16:21:27 | |
| the only way to get them is through launch_activate_socket | 16:21:42 | |
| they could be used as the names but then there would have to be major translation to the real names | 16:22:20 | |
| which have to be "ssh", "extra", "browser" and always finally "std" | 16:22:37 | |
| this commit which added that literally seems to be untested https://github.com/nix-community/home-manager/commit/ef506124579ff6280a43a9596bb2a5049872bf8e as it will not work | 16:24:04 | |
| additionally, patching this is hard as it shouldnt actually be used the gpgConf we need to wrap gpg-agent | 16:26:19 | |
| i personally have it working but it required a lot of changes | 16:27:49 | |
| including this https://github.com/auscyber/dotfiles/blob/e69c5ae454167f21dbaca7eace8e50e69d5d3454/overlays/literal.nix#L33C1-L39C4 https://github.com/auscyber/dotfiles/blob/master/packages/gpg/default.nix | 16:28:35 | |
| * additionally, patching this is hard as it shouldnt actually be used the gpgPkg we need to wrap gpg-agent | 16:32:41 | |