Pass as password manager and ncs improved

This commit is contained in:
2024-05-02 15:59:17 +01:00
parent a40cdf233b
commit 993ea82a9e
5 changed files with 45 additions and 7 deletions

2
.gitignore vendored
View File

@@ -7,3 +7,5 @@ switch.log
dotfiles/.config/VSCodium/*
!dotfiles/.config/VSCodium/User/settings.json
*cache*

View File

@@ -42,13 +42,17 @@ extract() {
}
ncs() {
echo "+ Syncing Nextcloud @ ~/Nextcloud"
mkdir ~/Nextcloud &> /dev/null
if [[ -z "$1" ]]; then
echo "USAGE: ncs <server_url>"
exit 1
server="trude.store"
else
server=$1
fi
nextcloudcmd -u $USER --path "/SYNC" ~/Nextcloud "https://$1"
echo "+ Syncing ~/Nextcloud/SYNC @ $server"
mkdir ~/Nextcloud &> /dev/null
nextcloudcmd -u $USER --path "/SYNC" ~/Nextcloud/SYNC "https://$server"
}
set completion-ignore-case On
# Passwords
export GITHUB_TOKEN=$(pass show github/token)

View File

@@ -1,3 +1,4 @@
[user]
email = "ehtrude@gmail.com"
name = "TrudeEH"
password = $GITHUB_TOKEN

23
dotfiles/.mutt/muttrc Normal file
View File

@@ -0,0 +1,23 @@
set ssl_starttls=yes
set ssl_force_tls=yes
set imap_pass="`pass show gmail/mutt`"
set smtp_pass="`pass show gmail/mutt`"
set imap_user = 'ehtrude@gmail.com'
set from='ehtrude@gmail.com'
set realname='TrudeEH'
set folder = imaps://imap.gmail.com/
set spoolfile = imaps://imap.gmail.com/INBOX
set postponed="imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
set smtp_url = 'smtps://ehtrude@gmail.com@smtp.gmail.com:465/'
set move = no
set imap_keepalive = 900

View File

@@ -1,4 +1,5 @@
#! /bin/bash
source dotfiles/.bashrc
# Install Paru
if [ ! $(command -v paru) ]; then
@@ -14,10 +15,10 @@ fi
paru -Sy curl git stow bat fzf less nextcloud-client
# Install Apps
paru -Sy obsidian signal-desktop fragments secrets newsflash eyedropper obfuscate gnome-console gnome-calendar impression gnome-podcasts geary brave-bin
paru -Sy obsidian signal-desktop newsflash eyedropper gnome-console gnome-calendar impression gnome-podcasts brave-bin
# Install CLI Apps
paru -Sy iamb tmux ollama vim
paru -Sy iamb tmux ollama vim transmission-cli mutt gpg pass
if [ $(pwd) != "$HOME/dotfiles" ]; then
cd $HOME
@@ -35,5 +36,12 @@ dconf load / < dconf-settings
xdg-settings set default-web-browser brave-browser.desktop
# Import Files, Passwords and Keys
ncs
gpg --import-ownertrust ~/Nextcloud/SYNC/exported-keys/private.pgp
gpg --import-ownertrust ~/Nextcloud/SYNC/exported-keys/public.pgp
gpg --import-ownertrust < ~/Nextcloud/SYNC/exported-keys/trustlevel.txt
ln -s ~/Nextcloud/SYNC/password-store/ ~/.password-store
echo
echo -e "${GREEN}[I] Done.${ENDCOLOR}"