Sender | Message | Time |
---|---|---|
27 May 2025 | ||
* K900: If I add the secret to
I end up with a different error:
| 09:50:47 | |
K900: When I add the HM module:
I end up with this error:
| 09:56:51 | |
It needs to be added to the HM imports | 09:57:31 | |
Not the nix-darwin imports | 09:57:36 | |
Because those are, yet again, separate | 09:57:41 | |
My apologies, how would I express that? | 09:58:10 | |
home-manager.users.foo.imports = [ agenix.homeManagerModules.default ] | 09:59:49 | |
K900 You've pointed me in the right direction:
By any chance, do you have a recommendation for how to handle this?
| 10:19:09 | |
I don't think it works like that | 10:20:26 | |
https://github.com/ryantm/agenix/issues/329? | 10:21:15 | |
Is there a preferred way of storing an agenix secret via HM? | 10:25:41 | |
Seemingly related | 10:35:56 | |
https://matrix.to/#/!XLCFfvFhUkYwOMLbVx:nixos.org/$g_OpCDha4vege-oXbuwHfZE-iDRvLC-abhfdkuZTq3I?via=nixos.org&via=matrix.org&via=frodux.net | 10:41:37 | |
* Looks like I stumbled upon an anti-pattern: https://matrix.to/#/!XLCFfvFhUkYwOMLbVx:nixos.org/$g_OpCDha4vege-oXbuwHfZE-iDRvLC-abhfdkuZTq3I?via=nixos.org&via=matrix.org&via=frodux.net | 10:42:10 | |
Not sure exactly how to do things properly though :( | 10:42:31 | |
ChatGPT is recommending an alternative approach:
It works, though I suspect it compromises reproducibility... Signing off for the evening. If there's a better way, I'd be keen to learn! | 11:03:22 | |
11:15:30 | ||
28 May 2025 | ||
Claude eventually helped me find a more pleasant solution based on The initial goal was to create a self-contained, minimal flake.nix that integrated nix-darwin, home-manager, and agenix. The desired end state is a macOS system with an agenix-encrypted secret decrypted and stored at ~/secret1.txt (by home-manager). The following
The secrets are defined in
If any Nix experts observe any flaws in this approach, please raise them now. Otherwise, I hope it helps:
| 03:49:26 | |
15:17:31 | ||
31 May 2025 | ||
20:52:37 | ||
1 Jun 2025 | ||
23:38:45 | ||
7 Jun 2025 | ||
17:45:05 | ||
22:57:38 | ||
23:48:03 | ||
9 Jun 2025 | ||
13:05:05 | ||
20:55:03 | ||
11 Jun 2025 | ||
02:02:44 | ||
12 Jun 2025 | ||
11:58:20 | ||
15 Jun 2025 | ||
04:29:11 | ||
19:07:07 |