]> git.scottworley.com Git - auto-upgrade-with-pinch/blobdiff - pkgs/homeless-gpg.nix
Use local pkgs instead of overlays
[auto-upgrade-with-pinch] / pkgs / homeless-gpg.nix
diff --git a/pkgs/homeless-gpg.nix b/pkgs/homeless-gpg.nix
new file mode 100644 (file)
index 0000000..221193f
--- /dev/null
@@ -0,0 +1,8 @@
+{ coreutils, gnupg, writeShellScript }:
+writeShellScript "homeless-gpg" ''
+  set -eo pipefail
+
+  export GNUPGHOME=$(${coreutils}/bin/mktemp -d)
+  trap '${coreutils}/bin/rm -r "$GNUPGHOME"' EXIT
+  ${gnupg}/bin/gpg --no-default-keyring "$@"
+''