add pass plugin to read secrets from password store
This commit is contained in:
parent
23e69232c4
commit
6ae0c69fa5
2 changed files with 13 additions and 0 deletions
3
extra-builtins.nix
Normal file
3
extra-builtins.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{ exec, ... }: {
|
||||||
|
pass = name: exec [./nix-pass.sh name];
|
||||||
|
}
|
10
nix-pass.sh
Executable file
10
nix-pass.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# nix-pass.sh
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
f=$(mktemp)
|
||||||
|
trap "rm $f" EXIT
|
||||||
|
pass show "$1" | head -c -1 > $f
|
||||||
|
nix-instantiate --eval -E "builtins.readFile $f"
|
Loading…
Reference in a new issue