WIP: Adds more items to runs/after/system, adds missing package to runs/dev, adds runs/after/gopass to remove password store.

This commit is contained in:
2025-11-10 15:15:10 -05:00
parent 3c98a008c8
commit f1b65e955e
5 changed files with 82 additions and 19 deletions

29
TODO.md
View File

@@ -1,5 +1,7 @@
# TODO
A list of in-progress and completed todo's.
## Arch Todos
- [ ] Update README, it's way out of date.
@@ -10,28 +12,39 @@
config in the dotfiles, but works if I use the default config. Need to explore
why (current thoughts are it has to do with creating the
clipboard_history.json file and not letting clipse do it automatically).
- [ ] Need to confirm bootstrap does things properly with git submodules.
- [x] Need to add the following system packages for neovim/render-markdown.nvim
- [x] `libtexprintf`
### Bootstrapping a new machine
- [ ] Need to confirm bootstrap does things properly with git submodules. Currently the
system run handles installing packages needed for my yubikey, probably need to automate
installing the public key into the keyring.
- [x] Add gpg public key import into `runs/after/system`
- [ ] Need to ensure ssh keys are setup before private submodules are loaded / installed,
so I need to make sure that Yubikey setup runs early and works for ssh authentication.
- [ ] Need to add the following system packages for neovim/render-markdown.nvim
- [ ] `libtexprintf`
### Keyboard / kanata
- [ ] Move keyboard (kanata) systemd service to be started as a '--user' service, as
- [x] Move keyboard (kanata) systemd service to be started as a '--user' service, as
it seems to not work when used on a desktop (mac mini) vs. laptop.
- [ ] Need to update kanatactl to generate udev rules, etc. (see
- [x] Need to update kanatactl to generate udev rules, etc. (see
here)[https://github.com/jtroo/kanata/blob/main/docs/setup-linux.md]
- [ ] Need to rethink symbol / number keyboard layers.
- [ ] Move symbols to their own layer.
- [ ] I would like to have a symbols layer that I can hold modifier keys with a symbol
and would also like to possibly pass through underlying key / experiment so that
I can use default keybinds in certain applications (i.e. neovim `[b`, etc.).
- [ ] Remove pkg sub-commands from kanatactl, it is available via package manager now.
### Runs (package installs)
- [ ] Should runs just export / echo a list of packages, then the `run` script can handle the package
- [x] Should runs just export / echo a list of packages, then the `run` script can handle the package
manager options / command.
- [ ] Think about adding an `after` directory for runs, so that they can perform setup tasks after
- [x] Think about adding a `before` and an `after` directory for runs, so that they can perform setup tasks after
the packages are installed.
- [ ] The `after` file should have the same name as the `run` file.
- [x] The `before` and `after` file should have the same name as the `run` file.
- [ ] This could allow to remove / move the `system` script into the `after` directory.
- [ ] Look into install packages with `nvim --headless`, not sure if this possible when using the new package
manager builtin to neovim as it prompts for user input to install packages.
- With lazy this was done with `nvim --headless "+Lazy! sync" +qa`

View File

@@ -2,13 +2,5 @@
# https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html
enable-ssh-support
ttyname $GPG_TTY
default-cache-ttl 60
default-cache-ttl 120
max-cache-ttl 120
#pinentry-program /usr/bin/pinentry-curses
#pinentry-program /usr/bin/pinentry-gnome3
#pinentry-program /bin/pinentry-tty
#pinentry-program /usr/bin/pinentry-x11
#pinentry-program /usr/local/bin/pinentry-curses
#pinentry-program /bin/pinentry-dmenu
#pinentry-program /opt/homebrew/bin/pinentry-mac

10
runs/after/gopass Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
XDG_DATA_HOME=${XDG_DATA_HOME:-"$HOME"/.local/share}
uninstall() {
[[ -d "$XDG_DATA_HOME/gopass" ]] && rm -rf "$XDG_DATA_HOME/gopass"
}
arg=${1:-""}
[[ $arg == "install" ]] && install

View File

@@ -4,19 +4,66 @@ set -e
set -o nounset
set -o pipefail
# Set scripts to be in the DEV_ENV folder encase they have not been
# installed yet.
SCRIPTS="${DEV_ENV}/env/.local/scripts"
_setup-mounts() {
local line="nas.housh.dev:/var/nfs/shared/michael_share /mnt/michael nfs defaults 0 0"
if sudo cat /etc/fstab | grep -vq "$line"; then
log " Setting up nas mount."
sudo mkdir -p /mnt/michael &>/dev/null
echo "$line" | sudo tee --append /etc/fstab
sudo systemctl daemon-reload
sudo mount -a ||
log --warning "You will need to make sure this computer's ip is in the allow list, then run 'sudo mount -a'"
fi
}
_setup-kanata() {
log " Setting up kanata udev rules."
sudo groupadd --system uinput
sudo usermod -aG input "$USER"
sudo usermod -aG uinput "$USER"
[[ ! -f /etc/udev/rules.d/99-input.rules ]] &&
(
echo 'KERNEL=="uinput", MODE="0660", GROUP="uinput", OPTIONS+="static_node=uinput"' |
sudo tee /etc/udev/rules.d/99-input.rules
) &&
sudo udevadm control --reload-rules &&
sudo udevadm trigger &&
sudo modprobe uinput
log " Setting up kanata, using kanatactl."
SCRIPTS="$SCRIPTS" "$SCRIPTS/kanatactl" service install --prompt
}
_setup-gpg() {
log " Setting up gpg."
local dir=/tmp/gpg-public-key
mkdir -p ~/{.gnupg,.ssh} &>/dev/null
chmod 700 ~/.gnupg
chmod 700 ~/.ssh
git clone https://git.housh.dev/michael/gpg-public-key.git "$dir"
pushd "$dir" &>/dev/null || exit 1
(
source ./import
)
popd &>/dev/null || exit 1
}
install() {
log " Setting user shell to 'zsh'."
sudo chsh --shell "$(which zsh)"
log " Enabling up systemd services."
log " Enabling systemd services."
sudo systemctl daemon-reload
sudo systemctl enable --now pcscd.service
sudo systemctl enable --now firewalld.service
systemctl --user enable --now logout-task.service
systemctl --user enable --now battery-monitor.timer
systemctl --user enable --now tmux-kill-sessions.timer
SCRIPTS="$SCRIPTS" "$SCRIPTS/kanatactl" service install --prompt
_setup-kanata
_setup-mounts
_setup-gpg
}
arg=${1:-""}

View File

@@ -7,6 +7,7 @@ fzf
git-lfs
gum
jq
libtexprintf
neovim
nodejs
npm