aboutsummaryrefslogtreecommitdiff
path: root/gui/pass.nix
blob: 9edd5a89bdb182987422b2ba42e1878a156eabd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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
  ];
}