nixos-config/pkgs/cpypsk.nix

14 lines
274 B
Nix

{ pkgs, pash, ... }:
pkgs.writeScript "cpypsk" ''
#!/bin/sh
D="''${PASH_DIR:-$HOME/.local/share/pash}"
D="''${D%/}"
for f in "$D"/*.gpg; do
n="''${f#$D/}"
n="''${n%.gpg}"
printf '%s\n' "$n"
done | ${pkgs.rofi}/bin/rofi -dmenu | xargs ${pash} copy
''