Passing Secrets to VM
I'm using agenix and microvm.nix and was wondering what the best way to pass a secret into the VM would be?
Do I:
-
Host holds the key and shares the decrypted secret (ie; give the secret the "kvm" role? now every VM can see it)
-
VM holds the key, and just does everything internally (not even sure how I'd do this since they're ephemeral)
Also, if anyone has used microvm.nix or io.systemd.credential, let me know since I'm having a whole sleuth of problems getting my credential permissions right.
Thanks!
Posted Dec 3, 2025, 1:39 AM UTC
30