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

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