Setup Checklist

  1. 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

  2. Install Webi CLI.

  3. Install GitHub CLI.

    webi gh
    
  4. Clone Neovim Config: Reference

    gh auth login
    
    • Windows
      cd ~/AppData/Local && gh repo clone nvim
      
    • Linux
      cd ~/.config/nvim && gh repo clone nvim
      
    • macOS
      cd ~/.config/nvim && gh repo clone nvim
      
  5. 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
  1. 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
  1. 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
    
    • Reference
    • 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
  2. 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
    
  3. Install the nvim-helper CLI used by <leader>b and the random log helpers.

    cd ~/.config/nvim/tools/nvim-helper
    go install
    
    • Ensure the resulting binary directory (usually $GOBIN or $GOPATH/bin) is on your PATH.
    • Run 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.
    • Run make base64-test to execute the Neovim end-to-end check that exercises the mapping against a scratch buffer.
    • Use :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.
  4. 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)
    
  5. Install ripgrep for fuzzy search

  1. Install staticcheck for additional Go analysis.
  1. Install Nerd Fonts Hack (Hack Nerd Font Mono).
  1. Install one these:

    • WezTerm
    • Alacritty
  2. Install LazyGit.

  1. Install jq
webi jq
  1. Restore Vimium from backup.

  2. Install htop for resource monitoring.

  1. Emplace .gitconfig

    cp ~/.config/nvim/.gitconfig ~/
    
  2. Install fd

webi fd
  1. Install shellcheck for shell script linting.
  1. Add SSH key.
nvim id_ed25519
chmod 600 id_ed25519
  1. Create deploy and service directories.
mkdir -p ~/deploy
mkdir -p ~/.local/share/systemd/user
  1. Configure production & staging in .ssh/config

    • Optional: sftp another computer and copy that .ssh/config
  2. Install Codex (he likes using python as a tool so we add that for him).

brew install codex
webi python3
  1. Install sops

  2. 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
    
    
  3. Install LVFS to update bios

    sudo pacman -S fwupd
    
  4. Syncthing / Wiki

  1. Install Fossil
  1. Rsync
sudo pacman -S rsync
  1. Secrets Management
  1. Cron Jobs
  1. 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

  1. 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
  1. 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
  1. For windows install
choco install windirstat

Revo Uninstaller

References

Using vim-dadbod

Command to open vim-dadbod

:DBUI 

Connection string format for sqlite

sqlite://<file-system-path>

Example:

sqlite:///data/data.db

Golang Profiler:

Setup

sudo apt-get install graphviz -y

Generate profile and view:

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 Maybe

  1. Install bat (used by the snippets generator).
    • Reference: https://github.com/sharkdp/bat?tab=readme-ov-file#installation
  2. 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
      
  3. Install Starship.
    • Reference: https://starship.rs
    • Place configs:
      cp ./starship/starship.toml ~/.config/starship.toml
      
    • Windows PowerShell profile:
      Copy-Item .\starship\Microsoft.PowerShell_profile.ps1 $profile
      
  4. Ensure the Chrome Tab Limit extension is installed and set to 4 tabs.
  5. Ubuntu accessibility adjustments:
    • Disable slow animations.
    • Enable large text.
    • Enable Night Light via Settings → Displays.
    • Configure fingerprint reader.
  6. Install 1Password TUI.
    • Install 1Password CLI: https://developer.1password.com/docs/cli/get-started/#install
    go install github.com/JeremiahVaughan/one-password-tui@latest
    
  7. Install i3.
    sudo apt install i3 -y
    mkdir -p ~/.config/i3
    cp ./i3/config ~/.config/i3/config
    
  8. Install zsh (optional; bash is fine).
    sudo apt install zsh -y
    chsh -s /bin/zsh
    
  9. fzf
    webi fzf
    
  10. 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
    
    
  11. Firefox as alternate popular browser for testing
yay -S firefox
  1. Rust TUI email client
cargo install himalaya --locked --features "oauth2 keyring"

Install one password cli to manage the email secrets (OnePassword)[https://developer.1password.com/docs/cli/get-started/]

  1. 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

  1. In settings, open it up to local network
  2. Set env var
OLLAMA_HOST=0.0.0.0

Troubleshooting

Recovery

  1. Run recover:
./recovery.sh

Mass Deploy:

./mass-deploy.sh

Nvim

Wipe out NVIM cache:

rm -rf ~/.cache/nvim ~/.local/state/nvim ~/.local/share/nvim
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\nvim-data"

Kill a service that refuses to die

systemctl --user kill -s SIGKILL <service_name>

Maintenance

Database maintenance

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

Home Router

Direct ports for UDP for current node

cd ~/deploy
fd -t f -g 'port.txt' -x sh -c 'head -n1 "$1"' sh {} | paste -sd, -