Keepassxc to bitwarden

This commit is contained in:
Kujiu 2024-01-23 02:59:56 +01:00
parent dff79df2da
commit de8a7c52f4
Signed by: kujiu
GPG Key ID: ABBB2CAC6855599F
15 changed files with 30 additions and 20 deletions

View File

@ -9,7 +9,7 @@ Some tools have their upstream licenses.
Some configurations for these tools:
- Passwords in KeePassXC (access by keyring)
- Passwords in Bitwarden (access by keyring or bw-cli)
- Neomutt + Aerc + notmuch + afew (mail)
- vdirsyncer + khal + khard (calendar and contacts)
- fish & xonsh
@ -43,7 +43,7 @@ You need to install:
- fish
- grammalecte-cli
- isync
- KeePassXC
- bitwarden-cli
- khal
- khard
- konsole
@ -74,10 +74,11 @@ You need to install:
- vdirsyncer
- visidata
- vlock
- bitwarden-keyring (but installed by script on debian)
- bluetuith (but installed by script on debian)
- broot (but installed by script on debian)
- cargo-espflash (but installed by script on debian)
- epr (but installed by script on debian)
- epy (but installed by script on debian)
- espflash (but installed by script on debian)
- espup (but installed by script on debian)
- lazydocker (but installed by script on debian)

File diff suppressed because one or more lines are too long

View File

@ -161,6 +161,12 @@ function update-homes -d "Update homes configuration"
echo
cargo install wthrr
echo
echo
echo (set_color 719cd6)"*** Install bitwarden-keyring ***"(set_color normal)
echo
pip install --user --upgrade --break-system-packages -U bitwarden-keyring
echo
echo
echo (set_color 719cd6)"*** Install offpunk ***"(set_color normal)

File diff suppressed because one or more lines are too long

View File

@ -98,7 +98,7 @@ $PATH = [
$NOTMUCH_CONFIG = p"~/.config/notmuch/notmuch-config"
$PROJECT_PATHS = [p"~/projects"]
$KEYRING_PROPERTY_SCHEME = "KeePassXC"
$KEYRING_PROPERTY_SCHEME = "Bitwarden"
$XONSH_COLOR_STYLE = 'nightfox_transparent'

View File

@ -0,0 +1,6 @@
#!/usr/bin/env fish
#
function bwu -d "bitwarden cli unlock"
set -xU BW_SESSION (bw unlock --raw $argv[1])
end

View File

@ -569,7 +569,7 @@ freshrss-min-items 200
#
# Default value: ""
#
freshrss-passwordeval "keyring get 'FRESHRSSKEEPASSXC' FRESHRSSLOGIN"
freshrss-passwordeval "bw get password FRESHRSSBITWARDEN"
#### freshrss-passwordfile
#

View File

@ -20,7 +20,7 @@ jid = REPLACE_JID
# A command that will be executed if "password" is not set, e.g. a session password
# manager like secret-tool on gnome, or anything you want
eval_password = keyring get "KEYRING_ID" "KEYRING_USER"
eval_password = bw get password "BITWARDENPASS"
# This identifies this client over time with the server, to let it optimise
# offline storage and various other features.

View File

@ -7,4 +7,3 @@ StartLimitBurst=2
ExecStart=/usr/bin/notmuch --config=REPLACE_HOME_USER/.config/notmuch/notmuch-config new
RuntimeMaxSec=3m
Restart=on-failure
Environment="KEYRING_PROPERTY_SCHEME=KeePassXC"

View File

@ -7,4 +7,3 @@ StartLimitBurst=2
ExecStart=/usr/bin/vdirsyncer sync
RuntimeMaxSec=3m
Restart=on-failure
Environment="KEYRING_PROPERTY_SCHEME=KeePassXC"

View File

@ -4,8 +4,8 @@ outgoing = smtp://template%40example.com@smtp.example.com
default = INBOX
from = Template Example <template@example.com>
copy-to = Sent
source-cred-cmd = keyring get "mail:template@example.com" "template@example.com"
outgoing-cred-cmd = keyring get "mail:template@example.com" "template@example.com"
source-cred-cmd = bw get password mail:template@example.com
outgoing-cred-cmd = bw get password mail:template@example.com
signature-file = "~/.config/aerc/accounts/acc:template@example.com/signature.txt"
pgp-auto-sign = true
pgp-opportunistic-encrypt = true

View File

@ -16,7 +16,7 @@ Trash Trash
IMAPStore test1@example.com
Host imap.example.com
User test1@example.com
PassCmd "keyring get 'cas:test1@example.com' 'test1@example.com'"
PassCmd "bw get password cas:test1@example.com"
SSLType STARTTLS
Channel test1@example.com
@ -29,7 +29,7 @@ Near :local:test1@example.com/
IMAPStore test2@example.com
Host imap.example.com
User test2@example.com
PassCmd "keyring get 'cas:test2@example.com' 'test2@example.com'"
PassCmd "bw get password cas:test2@example.com"
SSLType STARTTLS
Channel test2@example.com

View File

@ -1,7 +1,7 @@
set my_account_home = '~/.config/neomutt/accounts/template1@example.com'
set from = "template1@example.com"
set realname = "Mr Template Example"
set smtp_pass = "`keyring get 'mail:template1@example.com' 'template1@example.com'`"
set smtp_pass = "`bw get password mail:template1@example.com`"
set smtp_user = "$from"
set smtp_url = "smtp://$smtp_user@smtp.example.com:587/"
set signature = $my_account_home/signature.txt

View File

@ -22,7 +22,7 @@ fileext = ".vcf"
type = "carddav"
url = "https://nextcloud.example.com/remote.php/carddav/"
username = "example_user"
password.fetch = ["command", "keyring", "get", "dav:nextcloud.example.com", "example_user"]
password.fetch = ["command", "bw", "get", "password", "dav:nextcloud.example.com"]
# CALDAV
[pair example_calendar]
@ -41,4 +41,4 @@ fileext = ".ics"
type = "caldav"
url = "https://nextcloud.example.com/remote.php/caldav/"
username = "example_user"
password.fetch = ["command", "keyring", "get", "dav:nextcloud.example.com", "example_user"]
password.fetch = ["command", "bw", "get", "password", "dav:nextcloud.example.com"]

View File

@ -42,8 +42,7 @@ function update-homes-secrets -d "Update secrets for configuration of homes"
sed -i "s/REPLACE_DEVICE_HOSTNAME/`hostname`/g" ~/.config/poezio/poezio.cfg
sed -i "s/REPLACE_FINGERPRINT/cert_fingerprint/g" ~/.config/poezio/poezio.cfg
sed -i "s/REPLACE_JID/template@example.com/g" ~/.config/poezio/poezio.cfg
sed -i "s/KEYRING_ID/xmpp:template@example.com/g" ~/.config/poezio/poezio.cfg
sed -i "s/KEYRING_USER/template@example.com/g" ~/.config/poezio/poezio.cfg
sed -i "s/BITWARDENPASS/xmpp:template@example.com/g" ~/.config/poezio/poezio.cfg
sed -i "s/REPLACEDATADIR/.local\/share\/poezio/g" ~/.config/poezio/poezio.cfg
sed -i "s/REPLACECONFDIR/.config\/poezio/g" ~/.config/poezio/poezio.cfg
sed -i "s/REPLACECACHEDIR/.cache\/poezio/g" ~/.config/poezio/poezio.cfg
@ -53,7 +52,7 @@ function update-homes-secrets -d "Update secrets for configuration of homes"
echo (set_color 719cd6)"*** Set newsboat ***"(set_color normal)
echo
sed -i "s/FRESHRSSLOGIN/example_user/g" ~/.config/newsboat/config
sed -i "s/FRESHRSSKEEPASSXC/rss:freshrss.example.com/g" ~/.config/newsboat/config
sed -i "s/FRESHRSSBITWARDEN/rss:freshrss.example.com/g" ~/.config/newsboat/config
sed -i "s/FRESHRSSURL/https:\/\/freshrss.example.com\/api\/greader.php/g" ~/.config/newsboat/config