ctucx.git: nixfiles

ctucx' nixfiles

commit 131addc12ee54237a562c0e0105def0be4103262
parent 95f3ce9c7c3f00eeb74812cc67ba92dfd9e03ebc
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 3 Feb 2022 14:13:44 +0100

secret: add helper to read age privkey from password-store
1 file changed, 12 insertions(+), 0 deletions(-)
A
secrets/agenix
|
12
++++++++++++
diff --git a/secrets/agenix b/secrets/agenix
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+tempfile=$(mktemp)
+
+trap "rm -f $tempfile" SIGINT SIGTERM ERR EXIT
+
+touch $tempfile
+chmod 600 $tempfile
+
+echo "$(pass agenix-privkey)" > $tempfile
+
+agenix -i $tempfile "$@"