Bitwarden : Remove.
This commit is contained in:
parent
e59d82784e
commit
515a5bcde5
|
@ -1,58 +0,0 @@
|
||||||
{ ... }: {
|
|
||||||
text = ''
|
|
||||||
# Setup the pw manager.
|
|
||||||
function pwsetup() {
|
|
||||||
bw config server 'https://pass.voronind.com'
|
|
||||||
bw login
|
|
||||||
}
|
|
||||||
|
|
||||||
# Unlock the vault for current shell.
|
|
||||||
function pwunlock() {
|
|
||||||
if [ -z ''${BW_SESSION} ]; then
|
|
||||||
export BW_SESSION=$(bw unlock --raw)
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Lock the vault for current shell.
|
|
||||||
function pwlock() {
|
|
||||||
bw lock
|
|
||||||
unset BW_SESSION
|
|
||||||
}
|
|
||||||
|
|
||||||
# List all password entries.
|
|
||||||
function pwlist() {
|
|
||||||
bw list items | jq -r '.[] | .name'
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get entry data.
|
|
||||||
# Usage: pwget <NAME>
|
|
||||||
function pwget() {
|
|
||||||
local IFS=$'\n'
|
|
||||||
local entry="''${*}"
|
|
||||||
|
|
||||||
if [[ "''${entry}" = "" ]]; then
|
|
||||||
help pwget
|
|
||||||
return 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
local ids=($(_pwids "''${entry}"))
|
|
||||||
|
|
||||||
for id in "''${ids[@]}"; do
|
|
||||||
local result=($(bw get item "''${id}" | jq -r '(.name), (.login | .username, .password, .uris[].uri)'))
|
|
||||||
local name="''${result[0]}"
|
|
||||||
local login="''${result[1]}"
|
|
||||||
local password="''${result[2]}"
|
|
||||||
local urls=(''${result[@]:3})
|
|
||||||
|
|
||||||
printf "\nName: %s\n" "''${name}"
|
|
||||||
printf "Login: %s\n" "''${login}"
|
|
||||||
printf "Password: %s\n" "''${password}"
|
|
||||||
printf "Url: %s\n" "''${urls[@]}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
function _pwids() {
|
|
||||||
bw list items | jq -r '.[] | select(.name | match(".*'$*'.*")) | .id'
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -2,7 +2,6 @@
|
||||||
core = with pkgs; [
|
core = with pkgs; [
|
||||||
android-tools # Android adb tool. Can be used to connect to itself via wireless debugging. binwalk # Can analyze files for other files inside them.
|
android-tools # Android adb tool. Can be used to connect to itself via wireless debugging. binwalk # Can analyze files for other files inside them.
|
||||||
bat # Pretty cat.
|
bat # Pretty cat.
|
||||||
bitwarden-cli # Password manager.
|
|
||||||
bridge-utils # Network bridges.
|
bridge-utils # Network bridges.
|
||||||
btop htop # System monitors.
|
btop htop # System monitors.
|
||||||
coreutils # UNIX Core utilities.
|
coreutils # UNIX Core utilities.
|
||||||
|
|
Loading…
Reference in a new issue