Replace pass-clip with simple script
This commit is contained in:
parent
49d6ee9ad4
commit
59d58ae9e3
|
@ -63,7 +63,7 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
password-store = {
|
password-store = {
|
||||||
package = pkgs.pass-wayland.withExtensions (exts: [exts.pass-update pkgs.pass-clip exts.pass-otp]);
|
package = pkgs.pass-wayland.withExtensions (exts: [exts.pass-update exts.pass-otp]);
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PASSWORD_STORE_DIR = "${config.home.homeDirectory}/git/password-store";
|
settings.PASSWORD_STORE_DIR = "${config.home.homeDirectory}/git/password-store";
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,12 @@ in [
|
||||||
Edit = "codium ~/git/promotion";
|
Edit = "codium ~/git/promotion";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
Passmenu = {
|
||||||
|
Password = "pass-fzf";
|
||||||
|
OTP = "pass-fzf otp";
|
||||||
|
};
|
||||||
|
}
|
||||||
{
|
{
|
||||||
Power = {
|
Power = {
|
||||||
Shutdown = "systemctl poweroff";
|
Shutdown = "systemctl poweroff";
|
||||||
|
@ -88,7 +94,6 @@ in [
|
||||||
VoxMachina = "mpv https://www.youtube.com/playlist?list=PL1tiwbzkOjQz7D0l_eLJGAISVtcL7oRu_";
|
VoxMachina = "mpv https://www.youtube.com/playlist?list=PL1tiwbzkOjQz7D0l_eLJGAISVtcL7oRu_";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{Passmenu = "pass clip -f";}
|
|
||||||
{"Select Mode" = "select-mode";}
|
{"Select Mode" = "select-mode";}
|
||||||
{
|
{
|
||||||
Communication = [
|
Communication = [
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
self: super: {
|
|
||||||
pass-clip =
|
|
||||||
self.callPackage
|
|
||||||
({
|
|
||||||
stdenv,
|
|
||||||
fetchFromGitHub,
|
|
||||||
pass-wayland,
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "${pname}-${version}";
|
|
||||||
pname = "pass-clip";
|
|
||||||
version = "0.3";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ibizaman";
|
|
||||||
repo = "pass-clip";
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0myyyw0azci95jp8lwh6bm7xi171fv9vg8j6lzf9m9n7282cmy33";
|
|
||||||
};
|
|
||||||
dontBuild = true;
|
|
||||||
installPhase = "PREFIX=$out make install";
|
|
||||||
propagatedBuildInputs = [pass-wayland];
|
|
||||||
})
|
|
||||||
{};
|
|
||||||
}
|
|
28
overlays/pass-fzf.sh
Normal file
28
overlays/pass-fzf.sh
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
## Adapted from https://gist.github.com/heywoodlh/4c1e27f477a896bc3b0f6d55e2748d26
|
||||||
|
|
||||||
|
## Assumes that the user is using otp plugin
|
||||||
|
## Install fzf and make sure pass is configured beforehand
|
||||||
|
|
||||||
|
## If you want to grab the otp code, use like so: `pass-fzf.sh otp`, otherwise script will assume you want password
|
||||||
|
|
||||||
|
cd ~/.password-store || exit
|
||||||
|
|
||||||
|
if [[ $1 == 'otp' ]]
|
||||||
|
then
|
||||||
|
type="otp"
|
||||||
|
else
|
||||||
|
type="password"
|
||||||
|
fi
|
||||||
|
|
||||||
|
selection="$(find -L . -name '*.gpg' | sed -e 's/.\///' -e 's/.gpg//' | fzf)"
|
||||||
|
|
||||||
|
if [ ${type} == "otp" ]
|
||||||
|
then
|
||||||
|
pass otp "${selection}" -c
|
||||||
|
|
||||||
|
else
|
||||||
|
pass "${selection}" -c
|
||||||
|
fi
|
||||||
|
|
|
@ -158,6 +158,7 @@ self: super: {
|
||||||
gh
|
gh
|
||||||
;
|
;
|
||||||
obelisk = (import self.sources.obelisk {}).command;
|
obelisk = (import self.sources.obelisk {}).command;
|
||||||
|
pass-fzf = self.writeShellScriptBin "pass-fzf" (builtins.readFile ./pass-fzf.sh);
|
||||||
};
|
};
|
||||||
accounting-pkgs = {
|
accounting-pkgs = {
|
||||||
inherit (self.haskellPackages) hledger hledger-ui hledger-web;
|
inherit (self.haskellPackages) hledger hledger-ui hledger-web;
|
||||||
|
|
Loading…
Reference in a new issue