agenix | 383 Members | |
| age-encrypted secrets for NixOS https://github.com/ryantm/agenix/ | 102 Servers |
| Sender | Message | Time |
|---|---|---|
| 23 Oct 2023 | ||
In reply to @gigahawk:matrix.orgin any case I believe you'll need nixos running on that server in order to have secrets decrypted by agenix on boot | 15:11:54 | |
| Yea it's just annoying to have to ssh into it to create the secret, paste in the actual secret from my host, then transfer the files back to the host to commit to the repo | 15:29:48 | |
| Easier to just create everything from the host and then pull it on the server side | 15:30:19 | |
In reply to @gigahawk:matrix.orgHave you looked into deploy-rs? | 15:55:17 | |
| Yea I'm aware of the various deployment tools, but my setup isn't really that complicated and for now I still prefer just running nixos-rebuild on the machine I'm working on | 15:59:06 | |
| 25 Oct 2023 | ||
| 00:13:16 | ||
| 26 Oct 2023 | ||
| Question about agenix's homeManager module... does it work when there's a password on the key? I am getting an error 'No matching keys found' in the launchd logging, even though I am able to edit the .age file using the supplied key from age.identityPaths | 08:02:14 | |
| No, how would it work then | 08:27:54 | |
I finally switched to agenix age.secrets.<name>.files and I'm pretty happy with it: https://or.computer.surgery/charles/servy-fleet/-/commit/b01fc595fcf956fe462d2b57beaa0670a6163482 | 09:01:31 | |
I wonder if this would be worth upstreaming? Maybe with some more configurability, since the secrets is a little hardcoded | 09:02:26 | |
| * I wonder if this would be worth upstreaming in some capacity? Maybe with some more configurability, since the secrets is a little hardcoded | 09:02:38 | |
| * I wonder if this would be worth upstreaming in some capacity? Maybe with some more configurability, since the `secrets` directory is a little hardcoded | 09:02:56 | |
| The only thing I miss is having an agent to avoid giving my password every time, which gets really bad when rekeying | 09:03:49 | |
In reply to @charles:computer.surgeryIn particular I mean the little NixOS module in flake.nix and the mkSecret and mkSecrets functions (mainly the latter, the former is mostly just implementation details) in secrets.nix | 09:06:09 | |
| 27 Oct 2023 | ||
| 01:24:47 | ||
| 29 Oct 2023 | ||
| I stripped out the library functions to a standalone file so it's easier to steal:
Here's how I use it:
| 04:07:43 | |
| why does this happen?
the hashes are different but the contents of the file are the same | 04:37:03 | |
| * why does this happen?
the hashes are different but the contents of the file are the same | 04:37:33 | |
the goal is to have a systemd restartTriggers for a service that uses an agenix secret, and this does work, but it restarts every time instead of just when it changes | 04:38:43 | |
maybe i should builtins.readFile it so the restartTriggers just has the ciphertext? | 04:39:39 | |
| no that doesn't work because the contents can't be a nix string | 04:42:07 | |
builtins.hashFileing it worked | 04:49:19 | |
| 11:13:09 | ||
| 11:13:14 | ||
| 11:58:31 | ||
| 11:58:40 | ||
| 13:45:23 | ||
| 13:45:31 | ||
| 17:43:51 | ||
| 17:43:59 | ||