brain: add otp extension
This commit is contained in:
parent
215a7605d6
commit
14c72d7090
@ -1,16 +1,22 @@
|
|||||||
{ pass, runCommand, write, writeDash, ... }:
|
{ pkgs }:
|
||||||
|
|
||||||
write "brain" {
|
let
|
||||||
"/bin/brain".link = writeDash "brain" ''
|
pass = pkgs.pass.withExtensions (ext: [
|
||||||
|
ext.pass-otp
|
||||||
|
]);
|
||||||
|
in
|
||||||
|
|
||||||
|
pkgs.write "brain" {
|
||||||
|
"/bin/brain".link = pkgs.writeDash "brain" ''
|
||||||
PASSWORD_STORE_DIR=$HOME/brain \
|
PASSWORD_STORE_DIR=$HOME/brain \
|
||||||
exec ${pass}/bin/pass "$@"
|
exec ${pass}/bin/pass "$@"
|
||||||
'';
|
'';
|
||||||
"/bin/brainmenu".link = writeDash "brainmenu" ''
|
"/bin/brainmenu".link = pkgs.writeDash "brainmenu" ''
|
||||||
PASSWORD_STORE_DIR=$HOME/brain \
|
PASSWORD_STORE_DIR=$HOME/brain \
|
||||||
exec ${pass}/bin/passmenu "$@"
|
exec ${pass}/bin/passmenu "$@"
|
||||||
'';
|
'';
|
||||||
"/share/bash-completion/completions/brain".link =
|
"/share/bash-completion/completions/brain".link =
|
||||||
runCommand "brain-completions" {
|
pkgs.runCommand "brain-completions" {
|
||||||
} /* sh */ ''
|
} /* sh */ ''
|
||||||
sed -r '
|
sed -r '
|
||||||
s/\<_pass?(_|\>)/_brain\1/g
|
s/\<_pass?(_|\>)/_brain\1/g
|
||||||
|
Loading…
Reference in New Issue
Block a user