diff options
-rwxr-xr-x | build | 2 | ||||
-rw-r--r-- | nix/configuration.nix | 5 | ||||
-rwxr-xr-x | nixbuild | 2 | ||||
-rwxr-xr-x | scripts/pinentry-auto | 9 |
4 files changed, 14 insertions, 4 deletions
@@ -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; @@ -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 "$@" |