From 21209a2fcedcab9a87eb1269976cf59a4dc51e61 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 29 Feb 2020 11:15:05 +0100 Subject: Add rofi selector for pass --- gui/conf/xmonad.hs | 3 +++ gui/default.nix | 1 + gui/pass.nix | 32 ++++++++++++++++++++++++++++++++ home.nix | 1 - 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 gui/pass.nix diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index 5038f48..1505f6f 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -166,6 +166,9 @@ commonKeybindings host = , ("M-S-" , spawn "nvim-qt --no-ext-tabline") , ("" , spawn "flameshot gui") +-- password management + , ("M-p" , spawn "passrofi") + -- window management , ("M-q" , windows $ S.shift "NSP") , ("M-S-q" , kill) diff --git a/gui/default.nix b/gui/default.nix index 971afd1..8640143 100644 --- a/gui/default.nix +++ b/gui/default.nix @@ -10,6 +10,7 @@ in { ./vim.nix ./emacs.nix ./zathura.nix + ./pass.nix # applications grouped by purpose ./apps/file.nix ./apps/web.nix diff --git a/gui/pass.nix b/gui/pass.nix new file mode 100644 index 0000000..3c8331d --- /dev/null +++ b/gui/pass.nix @@ -0,0 +1,32 @@ +{ config, pkgs, ... }: + +let + emumenu = pkgs.writeTextFile { + name = "emumenu"; + executable = true; + destination = "/bin/dmenu"; + + text = '' + #!/usr/bin/env bash + ${pkgs.rofi}/bin/rofi -dmenu -p "pass" "$@" + ''; + }; + + passrofi = pkgs.writeTextFile { + name = "passrofi"; + executable = true; + destination = "/bin/passrofi"; + + text = '' + #!/usr/bin/env bash + export PATH="$PATH:${emumenu}/bin" + ${pkgs.pass}/bin/.passmenu-wrapped + ''; + }; + +in { + home.packages = [ + pkgs.pass + passrofi + ]; +} diff --git a/home.nix b/home.nix index d96752b..51030bb 100644 --- a/home.nix +++ b/home.nix @@ -18,7 +18,6 @@ keyboard.layout = "de"; packages = [ - pkgs.pass config.custom.pkgs.persistent-nix-shell ]; }; -- cgit v1.2.3