From 14c72d70908915e41554d0f24bd72f00a318b2a0 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 25 Jun 2024 11:30:34 +0200 Subject: brain: add otp extension --- krebs/5pkgs/simple/brain/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'krebs') 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 -- cgit v1.2.3