Compare commits

...

11 Commits

Author SHA1 Message Date
dca1234abe Install claude and opencode via bootstrap; drop nvm in favor of fnm 2026-08-16 10:26:40 +02:00
d58f02171a Add agent instructions for yadm dotfiles repo 2026-08-16 09:55:41 +02:00
0ff35915ed Fix NuForce uDAC USB disconnects
Cheap Savitech chip firmware stalls on rapid SET_INTERFACE / sample-rate
renegotiation, eventually dropping off the USB bus and requiring a
physical replug. Two fixes, both scoped to this exact device only:

- snd_usb_audio quirk_flags (262a:10aa): fixed_rate + ctl_msg_delay +
  iface_delay, applied via /etc/modprobe.d during bootstrap.
- WirePlumber: disable idle-suspend for the device's ALSA node so
  PipeWire doesn't repeatedly reopen the stream during normal use.
2026-08-16 09:49:14 +02:00
6476c98e8f Fix syntax error in apply-screen-layout.sh breaking display config
Missing space before ]] on the "vos" branch caused a bash parse
error, which made the whole script fail silently on every host
(including arch-bepis) before it could dispatch to the per-host
layout script. Also dropped the $(...) wrapping around each script
call, which captured swaymsg's JSON stdout and tried to execute it
as a command.
2026-08-16 08:02:00 +02:00
1e5fcb84b7 various 2026-08-15 15:16:27 +02:00
53fbf253a5 Adding sshd and mosh 2026-08-14 09:55:07 +02:00
d1dbdc9b9c Make bootstrap arch idempotent 2026-08-14 09:37:04 +02:00
8cf2abff31 Merge branch 'main' of ssh://git.zacke.dev:222/wholteza/dotfiles 2026-08-14 09:29:04 +02:00
532dc38965 Automatic prefix change to C-a when in ssh or mosh session 2026-08-14 09:28:59 +02:00
c9daf3ab58 Add no border to wezterm 2026-08-14 09:28:24 +02:00
6c247108fd Add wonderful toolchain path 2026-08-14 09:28:04 +02:00
8 changed files with 146 additions and 36 deletions

17
.bashrc
View File

@@ -133,11 +133,6 @@ export RIPGREP_CONFIG_PATH="$HOME/.ripgreprc"
export PASSBOOK_GPG_PATH="/usr/bin/gpg" export PASSBOOK_GPG_PATH="/usr/bin/gpg"
export PASSBOOK_ROOT_DIRECTORY="/home/wholteza/.password-store" export PASSBOOK_ROOT_DIRECTORY="/home/wholteza/.password-store"
### NVM setup
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
### Ngrok aliases ### Ngrok aliases
alias ngdo='ngrok http --domain=devops-extension.ngrok.dev 3000' alias ngdo='ngrok http --domain=devops-extension.ngrok.dev 3000'
@@ -200,20 +195,22 @@ if [[ -d /home/wholteza/.config/swayprop ]]; then
export PATH="/home/wholteza/.config/swayprop:$PATH" export PATH="/home/wholteza/.config/swayprop:$PATH"
fi fi
if [ -e /usr/share/nvm/init-nvm.sh ]; then
source /usr/share/nvm/init-nvm.sh
fi
export ompPath="$HOME/.config/oh-my-posh/theme.omp.json" export ompPath="$HOME/.config/oh-my-posh/theme.omp.json"
### Start oh my posh ### Start oh my posh
eval "$(oh-my-posh init bash --config $ompPath)" eval "$(oh-my-posh init bash --config $ompPath)"
eval "$(fnm env --use-on-cd --shell bash)"
if [ -d "$HOME/.cargo/env" ]; then if [ -d "$HOME/.cargo/env" ]; then
. "$HOME/.cargo/env" . "$HOME/.cargo/env"
fi fi
if [ -d "/opt/wonderful" ]; then
export PATH=/opt/wonderful/bin:$PATH
export WONDERFUL_TOOLCHAIN=/opt/wonderful
if [ -d "/opt/wonderful/thirdparty/blocksds" ]; then
export DLDITOOL=/opt/wonderful/thirdparty/blocksds/core/tools/dlditool/dlditool
fi
fi
export PATH="$HOME/.local/bin:$PATH" export PATH="$HOME/.local/bin:$PATH"
export PATH=/home/$USER/.fnm:$PATH export PATH=/home/$USER/.fnm:$PATH

View File

@@ -2,16 +2,16 @@
hostname=$(cat ~/hostname) hostname=$(cat ~/hostname)
if [[ $hostname == "bepis" ]]; then if [[ $hostname == "bepis" ]]; then
$(~/.config/screenlayout/desktop.sh) ~/.config/screenlayout/desktop.sh
elif [[ $hostname == "arch-bepis" ]]; then elif [[ $hostname == "arch-bepis" ]]; then
$(~/.config/screenlayout/arch-bepis-desktop-sway.sh) ~/.config/screenlayout/arch-bepis-desktop-sway.sh
elif [[ $hostname == "printer" ]]; then elif [[ $hostname == "printer" ]]; then
$(~/.config/screenlayout/printer.sh) ~/.config/screenlayout/printer.sh
elif [[ $hostname == "surface" ]]; then elif [[ $hostname == "surface" ]]; then
$(~/.config/screenlayout/surface.sh) ~/.config/screenlayout/surface.sh
elif [[ $hostname == "bepis-laptop" ]]; then elif [[ $hostname == "bepis-laptop" ]]; then
$(~/.config/screenlayout/laptop.sh) ~/.config/screenlayout/laptop.sh
elif [[ $hostname == "vos" ]]; then elif [[ $hostname == "vos" ]]; then
$(~/.config/screenlayout/vos.sh) ~/.config/screenlayout/vos.sh
fi fi

View File

@@ -14,4 +14,5 @@ input "type:pointer" {
accel_profile "flat" accel_profile "flat"
pointer_accel 0 pointer_accel 0
} }
input "*" xkb_layout colemak-se ## Dont do this since my non-laptop keyboard have hardware colemak layout
#input "*" xkb_layout colemak-se

15
.config/tmux-prefix-detect.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
# Auto-set tmux prefix based on connection type.
# Called from tmux hooks: session-created and client-attached.
if tmux show-environment SSH_CONNECTION 2>/dev/null | grep -qv '^-' || \
tmux show-environment MOSH_SERVER_PID 2>/dev/null | grep -qv '^-'; then
tmux set -g prefix C-a
tmux bind-key C-a send-prefix
tmux unbind-key C-b 2>/dev/null
tmux display-message "Prefix: C-a (remote)"
else
tmux set -g prefix C-t
tmux bind-key C-t send-prefix
tmux unbind-key C-a 2>/dev/null
tmux display-message "Prefix: C-t (local)"
fi

View File

@@ -0,0 +1,23 @@
# The NuForce uDAC (Savitech chip) has flaky firmware: when PipeWire
# idles and then resumes its ALSA node, the device often fails the
# resulting SET_INTERFACE / sample-rate renegotiation with a USB stall
# (spa.alsa: set_hw_params: Broken pipe). Enough of these in a row make
# the device drop off the USB bus and require a physical replug.
#
# Keeping the node's hardware stream open (no idle-suspend) avoids the
# repeated renegotiation and stops the crashes.
monitor.alsa.rules = [
{
matches = [
{
node.name = "~alsa_output.usb-Nuforce_Inc\\._NuForce_USB_Audio-.*"
}
]
actions = {
update-props = {
session.suspend-timeout-seconds = 0
}
}
}
]

7
.config/yadm/CLAUDE.md Normal file
View File

@@ -0,0 +1,7 @@
# Agent Instructions
- Be clear and concise.
- Never include AI attributions (e.g. "Co-Authored-By", "Generated with Claude") in commit messages.
- This is a yadm-managed dotfiles repo rooted at `$HOME`. Always use `yadm` (not plain `git`) for version control: `yadm status`, `yadm add`, `yadm commit`, `yadm push`, etc.
- Any change made here must be reproducible on other systems via `yadm bootstrap` — keep the bootstrap scripts (`bootstrap##*`) up to date when adding dependencies, packages, or setup steps a fresh system would need.
- Keep `readme.md` updated when relevant, and keep it short and to the point.

View File

@@ -1,15 +1,15 @@
#!/bin/bash #!/bin/bash
# Installs requirements for my arch setup. # Installs requirements for my arch setup.
set -e set -euo pipefail
sudo pacman -Suy --noconfirm archlinux-keyring # Refresh the keyring first, then do the full upgrade against synced dbs.
sudo pacman -Suy --noconfirm sudo pacman -Sy --noconfirm archlinux-keyring
sudo pacman -Su --noconfirm
sudo pacman -Sy --noconfirm \ sudo pacman -S --needed --noconfirm \
fd \ fd \
tmux \ tmux \
nvm \
telegram-desktop \ telegram-desktop \
signal-desktop \ signal-desktop \
alacritty \ alacritty \
@@ -23,33 +23,92 @@ sudo pacman -Sy --noconfirm \
jq \ jq \
bob \ bob \
gvfs-smb \ gvfs-smb \
pcmanfms \ pcmanfm \
wl-clipboard wl-clipboard \
openssh \
mosh \
opencode
bob install nightly bob install nightly
bob use nightly bob use nightly
vim --version nvim --version
if [ ! -d /home/wholteza/repos/yay ]; then # --- ssh / mosh: public-key-only access --------------------------------
cd ~ sudo systemctl enable --now sshd
mkdir -p repos
cd repos install -d -m 700 "$HOME/.ssh"
sudo pacman -S --needed git base-devel touch "$HOME/.ssh/authorized_keys"
chmod 600 "$HOME/.ssh/authorized_keys"
# Public keys trusted for this account (safe to publish, no private key
# material). Snapshot of `ssh-add -L` on 2026-08-14; appended if missing,
# never removes keys added by other means.
ssh_authorized_keys=(
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDQU7E/vo/+//WgeDPYX8wQudAQpx8FY2L7nv1wFCWaTrHqyUKL/ggmvtAXbkg9WqW/p6DmKbpDFNMKwKScK2OxjcxkPyQnmrmPW3SVU44RsN4R6Z0TKDSmVJ4wO35njYEfd8yKO4BDX8Q2T34lKHuBxqH/Q4Heknj4AEKB0l6xuHzfGumK4qN58qPZ6hFfPHffeOiYSh2hVWa/pRxbzD0ZDJ4eLXvUHPsQ+GVerLKv2ozVrhHOjouAQyuIFD86j8rUUnRp7keKawLUsmXvnO0IdJwi3c82j42+mUa8A3fb1glLGlax4glAhz3nw6v2NPk1V5BObCvT3zng3v6eteyEMW8E6qrUX3N9AUHABq4i8dkRKjQXL3V5dkAhTV0BzdxyBQ8/i8cWKGl2CZSPDzi37Si6RpiLboPtm3iY0mf74HbJPBUkA6YVYZEOLy0TPUkEQxkKVE/zI7GDe9CmGDRWOKm+naLSoQEr1/9xqAJlhz+HbWUkmam3MEaXXqDbY1s= wholteza_rsa"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIArtt5fhcXt2IVAmU2FWfQyrFiQmV/ym/cUM6jtpJ7CA ansible"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFFYS4L05dihHbrxX8NuPuOgAfRpMx7UJk95po5EdMQv HIT manually created id_ed25519"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGxWpXrFMFtG4KlqfMZ2kYUTEZ1sMfvpNFSUlQBkaeq0 wholteza"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKIZHsSfRcBFdg1pmV5ig/zZ5ZEy9iS6GiLK7kOy0Vcu HIT zacmon001"
)
for key in "${ssh_authorized_keys[@]}"; do
grep -qxF "$key" "$HOME/.ssh/authorized_keys" || echo "$key" >> "$HOME/.ssh/authorized_keys"
done
# Public-key-only: no passwords, no keyboard-interactive fallback.
# mosh's initial handshake goes through sshd, so this covers it too.
sudo install -d -m 755 /etc/ssh/sshd_config.d
sudo tee /etc/ssh/sshd_config.d/10-pubkey-only.conf > /dev/null <<'EOF'
PubkeyAuthentication yes
PasswordAuthentication no
KbdInteractiveAuthentication no
ChallengeResponseAuthentication no
AuthenticationMethods publickey
EOF
sudo systemctl reload sshd
# --- NuForce uDAC USB audio quirks --------------------------------------
# This DAC's firmware (262a:10aa) stalls on rapid SET_INTERFACE / sample
# rate renegotiation, which without these quirks eventually drops the
# device off the USB bus and requires a physical replug. Scoped to this
# exact VID:PID so it's a no-op on any machine without the device
# attached. Takes effect next time snd_usb_audio (re)probes the device
# (reboot, module reload, or replug) -- not applied retroactively here.
sudo install -d -m 755 /etc/modprobe.d
sudo tee /etc/modprobe.d/nuforce-udac-quirks.conf > /dev/null <<'EOF'
# fixed_rate (bit 21): device only offers one sample rate; stop the
# driver re-sending SET_CUR for it ("cannot set freq 48000 to ep 0x3").
# ctl_msg_delay (bit 8): 20ms pause around each USB control message.
# iface_delay (bit 11): 50ms pause around each SET_INTERFACE call.
options snd_usb_audio quirk_flags=262a:10aa:0x200900
EOF
if [ ! -d "$HOME/repos/yay" ]; then
mkdir -p "$HOME/repos"
cd "$HOME/repos"
sudo pacman -S --needed --noconfirm git base-devel
git clone https://aur.archlinux.org/yay.git git clone https://aur.archlinux.org/yay.git
cd yay cd yay
makepkg -si makepkg -si --noconfirm
fi fi
yay -S --noconfirm \ yay -S --needed --noconfirm \
fnm \ fnm \
oh-my-posh \ oh-my-posh \
wezterm wezterm
# --- migrate off nvm to fnm ---------------------------------------------
if pacman -Qi nvm &>/dev/null; then
sudo pacman -R --noconfirm nvm
fi
rm -rf "$HOME/.nvm"
export PATH=/home/$USER/.fnm:$PATH export PATH=/home/$USER/.fnm:$PATH
eval "$(fnm env --use-on-cd --version-file-strategy=recursive)" eval "$(fnm env --use-on-cd --version-file-strategy=recursive)"
fnm install 24 fnm install 24
fnm use 24 fnm use 24
npm install npm install -g @anthropic-ai/claude-code

View File

@@ -1,5 +1,5 @@
set -g prefix C-b set -g prefix C-t
bind C-b send-prefix bind C-t send-prefix
set -g mouse on set -g mouse on
set -g base-index 1 # start windows numbering at 1wq set -g base-index 1 # start windows numbering at 1wq
@@ -18,5 +18,13 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'git@github.com:user/plugin' # set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin' # set -g @plugin 'git@bitbucket.com:user/plugin'
set-window-option -g mode-keys vi set-window-option -g mode-keys vi
# Auto-switch prefix: C-a for SSH/mosh, C-b for local
set -ga update-environment 'MOSH_SERVER_PID'
set-hook -g session-created 'run-shell ~/.config/tmux-prefix-detect.sh'
set-hook -g client-attached 'run-shell ~/.config/tmux-prefix-detect.sh'
# Manual override: prefix+T to toggle
bind T run-shell ~/.config/tmux-prefix-detect.sh
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'