pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

commit b0b1d314b8671f83600cf5ffb9d5ac29683da96a
parent a11edd271d558ecb8d41fb2b7e95a7bc5165708c
Author: pyratebeard <root@pyratebeard.net>
Date:   Mon, 27 Nov 2023 23:40:26 +0000

dot_dot_dot

Diffstat:
Mentry/dot_dot_dot.md | 47+++++++++++++++++++++++++++++++++++++++++------
1 file changed, 41 insertions(+), 6 deletions(-)

diff --git a/entry/dot_dot_dot.md b/entry/dot_dot_dot.md @@ -1,16 +1,51 @@ -things changed: +A user's dotfiles are sacred. I, like many others, try to maintain all of my custom configurations and scripts in a [git repo](https://gitlab.com/pyratebeard/dotfiles){target="_blank" rel="noreferrer"}. -* gpg-agent pinentry wrapper script (commit 2240ff5ac739912b1c352ed97217b886ab0fb422) -* don't run welcome.zsh if over ssh (commit 8af62ecd9c7e44a77a11541b558fe1ca069a6e14) +This is a great when you need to build a new system, just clone and go. + +I have a number of different systems that I clone my dotfiles onto, PC, latptop, [phone](https://log.pyratebeard.net/entry/20170614-termux_on_android.html){target="_blank" rel="noreferrer"},and sometimes my servers. + +All of these systems can be slightly different. Maybe I'm running a different OS, like OpenBSD, so commands or filepaths are dissimilar. To deal with this I would create a new branch as soon as I clone my repo specifically for that device and make any slight adjustments. + +Over time I would modify or improve my dotfiles, but I wouldn't always push the changes straight away. I let things build up until I finally sit down, switch back to my main branch, and pick through the changes to push without including any device specific adjustments. + +This is a pain. So I have decided to spend some time improving things so I can stick to my main branch on all devices. + +#### [2240ff5ac739912b1c352ed97217b886ab0fb422](https://git.pyratebeard.net/dotfiles/commit/2240ff5ac739912b1c352ed97217b886ab0fb422.html){target="_blank" rel="noreferrer"} +One of the first things I have to change is the `pinentry` command in my _gpg-agent.conf_. I like the minimalism of `pinentry-tty` but it isn't available on all systems. + +To get around this I changed my _gpg-agent.conf_ to point to a wrapper script, `pinentry-select` +``` +#!/bin/sh +PE="" +BIN="/usr/bin" + +for p in pinentry-tty pinentry-curses pinentry ; do + command -v ${BIN}/${p} >/dev/null && PE="${BIN}/${p}" + break +done + +exec ${PE} "$@" +``` + +This script checks which command is available and sets it to the first one found. + +#### [b78637c91813483f9a9b80899c4f5d9ede5c14ed](https://git.pyratebeard.net/dotfiles/commit/b78637c91813483f9a9b80899c4f5d9ede5c14ed.html){target="_blank" rel="noreferrer"} +On my servers I don't tend to need GPG but my zsh config includes running `keychain` to set up ssh and gpg agents when a terminal is started. I modified my _keychain.zsh_ file to only run if `keychain` is installed. + +#### [8af62ecd9c7e44a77a11541b558fe1ca069a6e14](https://git.pyratebeard.net/dotfiles/commit/8af62ecd9c7e44a77a11541b558fe1ca069a6e14.html){target="_blank" rel="noreferrer"} +My zsh setup also includes a script which starts `tmux` on the first terminal opened and then runs my custom `ahoy` script. Again, I don't want or need this on my servers so I modified it not to run over ssh. + +#### [056f2d6ddfdab3b9345bd8dd7b65430defa8f0e2](TK){target="_blank" rel="noreferrer"} * different prompt if over vim or ssh (commit 056f2d6ddfdab3b9345bd8dd7b65430defa8f0e2) + +#### [9aa4aee5b7a121c0af42de4bf730e8f23e8166f8](TK){target="_blank" rel="noreferrer"} * switch to /usr/bin/env bash (commit 9aa4aee5b7a121c0af42de4bf730e8f23e8166f8) -* don't run keychain if keychain not installed +#### [58fa110b56b090fbb378a16ad8df5a812588a20b](TK){target="_blank" rel="noreferrer"} +* doas/sudo in aliases, alias make to gmake on openbsd, and halt things still to change * tmux status - battery -* doas/sudo in aliases -* alias make to gmake on openbsd * iip alias breaks things on openbsd * herbstluftwm urxvt needs LANG on openbsd for some reason * mario urxvt needs LANG on openbsd for some reason