summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2021-11-07 11:20:10 +0100
committerTom Barrett <tom@tombarrett.xyz>2021-11-07 11:20:10 +0100
commit7ca519190e5be40ccae0d8b12a17c36e5469e230 (patch)
treed9b56f83e28b288e97751f1bdd09061107baeb10
parentf16cd1633c4b3dc0c4dbcd84a53a71ba24dbc136 (diff)
works for nix now too
-rwxr-xr-xbuild2
-rw-r--r--nix/configuration.nix5
-rwxr-xr-xnixbuild2
-rwxr-xr-xscripts/pinentry-auto9
4 files changed, 14 insertions, 4 deletions
diff --git a/build b/build
index a8e38e9..c83817a 100755
--- a/build
+++ b/build
@@ -40,7 +40,7 @@ ln -s "$ST_DIR/st" "$HOME/bin"
# pinentry-dmenu setup
PE_DIR="$HOME/src/pinentry-dmenu"
-git clone https://git.tombarrett.xyz/tom/st "$PE_DIR"
+git clone https://git.tombarrett.xyz/tom/pinentry-dmenu "$PE_DIR"
make -C "$PE_DIR"
diff --git a/nix/configuration.nix b/nix/configuration.nix
index aa6f3e0..2ee63d0 100644
--- a/nix/configuration.nix
+++ b/nix/configuration.nix
@@ -32,6 +32,7 @@
w3m
firefox
wget
+ tmux
curl
dmenu
pass
@@ -40,14 +41,16 @@
neomutt
acpi
ranger
+ ncdu
mpc_cli
lm_sensors
+ pinentry-curses
];
programs.gnupg.agent = {
enable = true;
- pinentryFlavor = "gtk2";
enableSSHSupport = true;
+ pinentryFlavor = null;
};
programs.zsh.enable = true;
diff --git a/nixbuild b/nixbuild
index 0012392..b82e12e 100755
--- a/nixbuild
+++ b/nixbuild
@@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
-#!nix-shell -p xorg.libX11.dev xorg.libXft xorg.libXinerama git bash pkg-config
+#!nix-shell -p xorg.libX11.dev xorg.libXft xorg.libXinerama git bash pkg-config gpgme libconfig
#!nix-shell -i bash
./build
diff --git a/scripts/pinentry-auto b/scripts/pinentry-auto
index 4b90cc1..d9c7bda 100755
--- a/scripts/pinentry-auto
+++ b/scripts/pinentry-auto
@@ -1,7 +1,14 @@
#!/bin/sh
set -Ceu
-if ps -e | grep -q X; then
+# for nixos
+exists=$(command -v pgrep || echo "")
+if [ -z "$exists" ]; then
+ PATH="/run/current-system/sw/bin/:"$PATH
+fi
+
+
+if pgrep -x X > /dev/null; then
/home/"$USER"/bin/pinentry-dmenu "$@"
else
pinentry-curses "$@"