diff options
author | tv <tv@krebsco.de> | 2024-06-25 11:30:34 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2024-06-25 11:30:34 +0200 |
commit | 14c72d70908915e41554d0f24bd72f00a318b2a0 (patch) | |
tree | e0aead8fd2fa2d16e8081c72cf843a968e2ccefb /krebs/5pkgs | |
parent | 215a7605d695865bd84e6ec0d4f813ef1894b950 (diff) |
brain: add otp extension
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r-- | krebs/5pkgs/simple/brain/default.nix | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/krebs/5pkgs/simple/brain/default.nix b/krebs/5pkgs/simple/brain/default.nix index aca06c407..d7e36a527 100644 --- a/krebs/5pkgs/simple/brain/default.nix +++ b/krebs/5pkgs/simple/brain/default.nix @@ -1,16 +1,22 @@ -{ pass, runCommand, write, writeDash, ... }: +{ pkgs }: -write "brain" { - "/bin/brain".link = writeDash "brain" '' +let + pass = pkgs.pass.withExtensions (ext: [ + ext.pass-otp + ]); +in + +pkgs.write "brain" { + "/bin/brain".link = pkgs.writeDash "brain" '' PASSWORD_STORE_DIR=$HOME/brain \ exec ${pass}/bin/pass "$@" ''; - "/bin/brainmenu".link = writeDash "brainmenu" '' + "/bin/brainmenu".link = pkgs.writeDash "brainmenu" '' PASSWORD_STORE_DIR=$HOME/brain \ exec ${pass}/bin/passmenu "$@" ''; "/share/bash-completion/completions/brain".link = - runCommand "brain-completions" { + pkgs.runCommand "brain-completions" { } /* sh */ '' sed -r ' s/\<_pass?(_|\>)/_brain\1/g |