!XLCFfvFhUkYwOMLbVx:nixos.org

agenix

355 Members
age-encrypted secrets for NixOS https://github.com/ryantm/agenix/90 Servers

Load older messages


SenderMessageTime
16 Jan 2024
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @oddlama:matrix.org
Please excuse the self-promotion; Since I had the same problem myself I made https://github.com/oddlama/agenix-rekey to allow storing secrets encrypted for a yubikey and have them rekeyed for hosts automatically. It sounds like this might also be useful for your usecase :)
I already saw it, again, what does it do besides password generation and using yubikey
How is it different from the regular age-yubikey-plugin? πŸ€”πŸ€”πŸ€”
03:14:31
@oddlama:matrix.orgoddlamaIt is built on top of age plugin yubikey and agenix, it replaces neither. The difference is that it allows you to use a yubikey encrypted secret in your configuration and have it automatically rekeyed for the host's ssh key. Meaning you don't have to store any secrets encrypted for your host pubkeys in your repository.11:39:46
@kranzes:matrix.orgIlan Joselevich (Kranzes)But there's a catch, you can't build the system closure for any system13:15:26
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @kranzes:matrix.org
But there's a catch, you can't build the system closure for any system
? πŸ˜… system closure?
13:26:19
@kranzes:matrix.orgIlan Joselevich (Kranzes)the top level derivation of a nixos system13:29:41
@oddlama:matrix.orgoddlama
In reply to @kranzes:matrix.org
But there's a catch, you can't build the system closure for any system
true, not automatically including the secrets of course. But you can build it with dummy secrets in a CI if you want to setup a cache or something.
13:30:51
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @kranzes:matrix.org
the top level derivation of a nixos system
You mean like the first deploy? πŸ˜…
14:27:23
@kranzes:matrix.orgIlan Joselevich (Kranzes)No14:27:35
@kranzes:matrix.orgIlan Joselevich (Kranzes)i mean nixosConfigurations.X.config.system.build.toplevel14:27:59
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @kranzes:matrix.org
i mean nixosConfigurations.X.config.system.build.toplevel
(Time for a joke)
It's says "This site can’t be reached"
14:39:37
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @kranzes:matrix.org
i mean nixosConfigurations.X.config.system.build.toplevel
I don't know even if i'm using it πŸ˜…
14:40:26
@kranzes:matrix.orgIlan Joselevich (Kranzes)You are.14:40:41
@kranzes:matrix.orgIlan Joselevich (Kranzes)All NixOS machines have that derivation14:40:52
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @kranzes:matrix.org
All NixOS machines have that derivation
So, what basically are the restrictions i would have by using agenix-rekey
Tbh, i don't completely understand what it really does
(I forgot to reply to oddlama to clarify)
14:44:26
@kranzes:matrix.orgIlan Joselevich (Kranzes)The restrictions are that you can't build a nixos system from another computer that can't decrypt the secrets14:45:12
@kranzes:matrix.orgIlan Joselevich (Kranzes)Which is an impurity on its own14:45:19
@oddlama:matrix.orgoddlamaSure, secret rekeing is fundamentally an impurity 14:49:57
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @kranzes:matrix.org
The restrictions are that you can't build a nixos system from another computer that can't decrypt the secrets
Thank you for your effort trying to explain me this, but i'm feeling that now i have even more dumb questions than before 🫠 it seems like i don't really understand how agenix or sops work, i need to get more understanding of them before trying to understand some difference here πŸ₯²
14:52:05
@galaxyyy:matrix.org@galaxyyy:matrix.org set a profile picture.17:56:26
17 Jan 2024
@gigahawk:matrix.orggigahawkDoes anyone have experience with using agenix on SBC's like an RPi? I'd like to be able to build an SD card image that can be flashed and booted without any further intervention (i.e. no logging in over ssh or something to update the host key)04:31:11
@gigahawk:matrix.orggigahawk

I'm thinking something like:

  • generate host key on my build machine
  • build the image
  • inject the key into the image
  • flash onto SD and everything should just work
04:31:58
@gigahawk:matrix.orggigahawkand then i guess delete all local artifacts for security etc.04:32:36
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @gigahawk:matrix.org

I'm thinking something like:

  • generate host key on my build machine
  • build the image
  • inject the key into the image
  • flash onto SD and everything should just work
Can't you just inject the key declaratively? πŸ€”
04:34:12
@gigahawk:matrix.orggigahawkwell I don't really want to have the key stored anywhere other than the final image before flashing04:35:06
@gigahawk:matrix.orggigahawkand it can't itself be a agenix secret because I'm building from a non nixos machine04:35:44
@xxxcrow:matrix.orgn3v3r_a9a1n
In reply to @gigahawk:matrix.org
well I don't really want to have the key stored anywhere other than the final image before flashing
Oh, yeah, right
04:36:05
19 Jan 2024
@reese:cyberia.club@reese:cyberia.club joined the room.23:18:08
21 Jan 2024
@fadenb:utzutzutz.net@fadenb:utzutzutz.net joined the room.18:14:15
23 Jan 2024
@adam:robins.wtf@adam:robins.wtf joined the room.00:44:02
@tornax:matrix.orgtornax joined the room.20:04:34

Show newer messages


Back to Room ListRoom Version: 6