Basic Node setup (needed on all nodes dev, server, etc) Background services running as non root
mkdir -p /home/piegarden/.local/share/systemd/user
# needed otherwise services will only work when the user is logged in
sudo loginctl enable-linger $USER
# verify
loginctl show-user $USER -p Linger
Remove Windows Junk Use custom removal option, because you really want to get rid of the game bar stuff. It is very annoying https://github.com/Raphire/Win11Debloat
Install Webi CLI.
Install GitHub CLI.
webi gh
Clone Neovim Config: Reference
gh auth login
Windows
cd ~/AppData/Local && gh repo clone nvim
Linux
cd ~/.config && gh repo clone nvim
macOS
cd ~/.config && gh repo clone nvim
Emplace dotfiles
# only remove if you are sure all your files are tracked in git
rm -rf ~/.config/hypr
ln -s ~/.config/nvim/dotfiles/hypr ~/.config/hypr
rm -rf ~/.config/espanso
ln -s ~/.config/nvim/dotfiles/espanso ~/.config/espanso
Install monitor manager Option 1. (prefered) Reference
yay -S hyprmon-bin
# run hyprmon and set positioning and scaling
hyprmon
Option 2. Alternatively you can edit the monitors.conf file, but I found the TUI to be a far better experience Scalling to monitor size Uncomment the correct lines in:
~/.config/hypr/monitors.conf
Install Neovim.
install stuff to help tree-sitter
# For installing new parsers
cargo install tree-sitter-cli && \
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc && \
source ~/.bashrc
tree-sitter --version
# For compiling the parsers written in C
brew upgrade zig || brew install zig
# Helpers
cd ~/Downloads
git clone https://codeberg.org/jeremiahvaughan/base64-toggle.git
cargo install --path ./base64-toggle
git clone https://codeberg.org/jeremiahvaughan/random-string.git
cargo install --path ./random-string
cd -
Open Neovim.
If you see an install error, it just means something needs to be installed; handle the dependency and restart Neovim.
After restarting, run:
:checkhealth
If Neovim misbehaves, view logs with:
:messages
For tree-sitter issues you may want to clear the cache: nvim troubleshooting
Install neovide https://neovide.dev/
Arch
sudo pacman -S neovide
Windows
scoop bucket add extras
scoop install neovide
Open shortcut location
Right click shortcut and select properties
Add "--wsl --neovim-bin /home/linuxbrew/.linuxbrew/bin/nvim" to the end of the target
Install the nvim-helper CLI used by <leader>b and the random log helpers.
cd ~/.config/nvim/tools/nvim-helper
go install
$GOBIN or $GOPATH/bin) is on your PATH.make nvim-helper-test (from the repo root) to execute the helper's unit tests; the command automatically isolates Go's build cache in /tmp/nvim-gocache.make base64-test to execute the Neovim end-to-end check that exercises the mapping against a scratch buffer.:GoUpdate inside Neovim to run the helper's Go module updater; set vim.g.go_update_target_version (defaults to 1.24.7) to control the enforced go directive and populate the quickfix list with updated go.mod files.Fixing path issues for GUI applications like NEOVIDE Set env vars like $PATH in: ~/.config/hypr/envs.conf. This lets your
env = PATH,/home/piegarden/.local/opt/go/bin:/home/piegarden/go/bin:$PATH
# Reload for changes to take effect:
hyprctl reload
# then restart session (reload alone isn't enough)
Install ripgrep for fuzzy search
#deb
sudo apt-get install ripgrep
Install staticcheck for additional Go analysis.
Install Nerd Fonts Hack (Hack Nerd Font Mono).
webi nerdfont
Install one these:
Install delta
# Arch
pacman -S git-delta
# Mac
brew install git-delta
Install LazyGit.
Emplace config file:
Windows
Copy-Item .\lazygit\config.yml $env:APPDATA\lazygit\config.yml
Linux
rm -rf ~/.config/lazygit
ln -s ~/.config/nvim/dotfiles/lazygit ~/.config/lazygit
Install jq
webi jq
Restore Vimium from backup.
Install htop for resource monitoring.
Unix
brew install htop
Windows
choco install ntop.portable
Deb
sudo apt install htop
Emplace .gitconfig
cp ~/.config/nvim/dotfiles/.gitconfig ~/
Install fd
webi fd
Install shellcheck for shell script linting.
Add SSH key.
nvim id_ed25519
chmod 600 id_ed25519
Create deploy and service directories.
mkdir -p ~/deploy
mkdir -p ~/.local/share/systemd/user
Configure production & staging in .ssh/config
Install Codex (he likes using python as a tool so we add that for him).
brew install codex
webi python3
Install sops Reference
Install Age Reference
go install filippo.io/age/cmd/...@latest
Install raspberry pi imager
sudo pacman -S rpi-imager
sudo -E rpi-imager
# or
sudo pacman -S flatpak
flatpak install flathub org.raspberrypi.rpi-imager
flatpak run org.raspberrypi.rpi-imager
Install LVFS to update bios
sudo pacman -S fwupd
Syncthing / Wiki
Install Fossil
Rsync
sudo pacman -S rsync
Secrets Management
Cron Jobs
Install Draw.io Desktop
mkdir -p ~/Applications
VERSION=29.5.2
mv ~/Downloads/drawio-x86_64-${VERSION}.AppImage ~/Applications/
chmod +x ~/Applications/drawio-x86_64-${VERSION}.AppImage
mv "${HOME}/Applications/drawio-x86_64-${VERSION}.AppImage" ~/Applications/drawio.AppImage
cat <<-EOF > "${HOME}/.local/share/applications/drawio.desktop"
[Desktop Entry]
Name=Draw.io
Exec=/home/piegarden/Applications/drawio.AppImage
Icon=/home/piegarden/Applications/drawio.png
Type=Application
Categories=Utility;
Terminal=false
EOF
Cross Compiler for Rust Install Rust
# 1) Ensure rustup-managed toolchain is installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup default stable
rustup toolchain install stable
# 2) Add ARM64 Rust target to that toolchain
rustup target add --toolchain stable aarch64-unknown-linux-gnu
# 3) Cross C toolchain (needed by sqlite3-sys and other C deps)
sudo pacman -S --needed aarch64-linux-gnu-gcc
# 4) Verify
rustup target list --installed | rg aarch64-unknown-linux-gnu
rustup show active-toolchain
which cargo rustc rustup
Disable Docker if you not using it (it can conflict with dnsmasq which is useful for setting up local dns without having to edit hosts file
systemctl stop docker docker.socket && \
systemctl disable docker docker.socket && \
systemctl stop containerd &&
systemctl disable containerd &&
sudo rm -f /etc/systemd/resolved.conf.d/20-docker-dns.conf
For windows install
choco install windirstat
mkcert
sudo pacman -S mkcert
Inkscape
sudo pacman -Syu inkscape
Espanso Reference
sudo pacman -S wxwidgets-gtk3
# Clone the Espanso repository
git clone https://github.com/espanso/espanso
cd espanso
# Compile espanso in release mode
# NOTE: this will take a while (~5/15 minutes)
cargo build -p espanso --release --no-default-features --features modulo,vendored-tls,wayland
sudo mv target/release/espanso /usr/local/bin/espanso
# Register espanso as a systemd service (required only once)
espanso service register
# Start espanso
espanso start
# Your screen will flicker until you run this
sudo setcap "cap_dac_override+p" $(which espanso)
Net Tools (nslookup)
sudo pacman -S bind
Flameshot (screenshot tool) Referenc
brew install --cask flameshot
Eza
cargo install eza
Command to open vim-dadbod
:DBUI
Connection string format for sqlite
sqlite://<file-system-path>
Example:
sqlite:///data/data.db
Sqlite
#deb
sudo apt update
sudo apt install sqlite3
#arch
sudo pacman -S sqlite
Markdown Linter
cargo install rumdl
Paper Scanner
Plugin the scanner via usb
sudo apt update
sudo apt install sane-utils libsane1
cat << EOF > scan.service
[Unit]
Description=Scanner Service that allows button on scanner to work
After=network-online.target
[Service]
WorkingDirectory=/home/piegarden/Downloads
ExecStart=/usr/bin/brscan-skey -f
Restart=always
RestartSec=45
[Install]
WantedBy=default.target
EOF
# Check connected scanners
scanimage -L
sudo apt-get install graphviz -y
make p
go tool pprof http://localhost:8081/debug/pprof/profile?seconds=30
go tool pprof -http=:8082 http://localhost:8081/debug/pprof/profile?seconds=1
Install bat (used by the snippets generator).
Configure copy/paste for remote SSH sessions.
macOS via iTerm2 (recommended).
macOS alternative:
cp ./alacritty.toml "$HOME/.alacritty.toml"
or
cp ./.wezterm.lua "$HOME/.wezterm.lua"
Windows:
Copy-Item .\alacritty.toml $env:APPDATA\alacritty\alacritty.toml
or
Copy-Item .\.wezterm.lua $env:USERPROFILE\.wezterm.lua
Install Starship.
Reference: https://starship.rs
Place configs:
ln -s "$HOME/.config/nvim/starship/starship.toml" ~/.config/starship.toml
Windows PowerShell profile:
Copy-Item .\starship\Microsoft.PowerShell_profile.ps1 $profile
Ensure the Chrome Tab Limit extension is installed and set to 4 tabs.
Ubuntu accessibility adjustments:
Install 1Password TUI.
go install github.com/JeremiahVaughan/one-password-tui@latest
Install i3.
sudo apt install i3 -y
mkdir -p ~/.config/i3
cp ./i3/config ~/.config/i3/config
Install zsh (optional; bash is fine).
sudo apt install zsh -y
chsh -s /bin/zsh
fzf
webi fzf
AP mode in case you don't have a wireless AP handy: ref: https://wiki.archlinux.org/title/Software_access_point
sudo pacman -S hostapd
sudo pacman -S dnsmasq
in /etc/hostapd/hostapd.conf
set ssid, wpa_passphrase,
enable ieee80211n, ieee80211d, ieee80211ac, ieee80211ax, disable require_ht (windows wants this) set: wpa=2, wpa_key_mgmt=WPA-PSK, rsn_pairwise=CCMP, country_code=US
sudo systemctl enable hostapd
sudo systemctl start hostapd
sudo systemctl enable dnsmasq
sudo systemctl start dnsmasq
sudo mkdir /etc/systemd/system/hostapd.service.d
sudo nvim /etc/systemd/system/hostapd.service.d/override.conf
[Unit]
BindsTo=sys-subsystem-net-devices-wlan0.device
After=sys-subsystem-net-devices-wlan0.device
check active dns leases
```bash
cat /var/lib/misc/dnsmasq.leases
Firefox as alternate popular browser for testing
yay -S firefox
# or
sudo pacman -S firefox
Rust TUI email client
cargo install himalaya --locked --features "oauth2 keyring"
Install one password cli to manage the email secrets OnePassword
Crush (opencode) Reference
go install github.com/charmbracelet/crush@latest
# give crush the golang lsp
webi go-essentials
# give crush the rust lsp
rustup component add rust-analyzer
# place your api key:
# 1 (neovide). ~/.config/uwsm/env
# 2 (shell). ~/.bashr
Local model install Ollama On Windows make sure Ollama is exposed
In settings, open it up to local network
Set env var
OLLAMA_HOST=0.0.0.0
anki flash cards Install
export VERSION="26.08"
tar xaf "Downloads/anki-${VERSION}-linux-x86_64.tar.zst"
cd anki-linux
mkdir -p ~/Applications
mv anki.png "${HOME}/Applications/anki.png"
sudo ./install.sh
export ANKI=$(which anki)
cat <<-EOF > "${HOME}/.local/share/applications/anki.desktop"
[Desktop Entry]
Name=Anki
Exec=${ANKI}
Icon=${HOME}/Applications/anki.png
Type=Application
Categories=Utility;
Terminal=false
EOF
Run recover:
./recovery.sh
./mass-deploy.sh
Wipe out NVIM cache:
rm -rf ~/.cache/nvim ~/.local/state/nvim ~/.local/share/nvim
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\nvim-data"
Start neovim with no configs
nvim -u NONE
systemctl --user kill -s SIGKILL <service_name>
If you need to delete a bunch of data from the DB:
# Turn off database backups
systemctl --user stop jobby
# Turn off the service
systemctl --user stop shepherd
# Run the query
sqlite3 ~/deploy/shepherd-data/data 'DELETE FROM service_log;'
# Vacuum the database
sqlite3 ~/deploy/shepherd-data/data 'VACUUM;'
# Checkpoint the WAL file
sqlite3 ~/deploy/shepherd-data/data 'PRAGMA wal_checkpoint(TRUNCATE);'
# Verify sizes are what you expect
ls -hal ~/deploy/shepherd-data
# Turn on the database backups
systemctl --user start jobby
# Turn on the service
systemctl --user start shepherd
Direct ports for UDP for current node
cd ~/deploy
fd -t f -g 'port.txt' -x sh -c 'head -n1 "$1"' sh {} | paste -sd, -