Commit 593cc940af31
Changed files (7)
dots
config
dots/config/boox/bootstrap.sh
@@ -0,0 +1,52 @@
+#!/data/data/com.termux/files/usr/bin/bash
+# Boox Termux bootstrap script
+# Run once after fresh Termux install:
+# curl -sL https://raw.githubusercontent.com/<your-repo>/main/dots/config/boox/bootstrap.sh | bash
+# Or copy via adb and run locally.
+set -euo pipefail
+
+echo "==> Updating packages..."
+pkg update -y && pkg upgrade -y
+
+echo "==> Installing essentials..."
+pkg install -y openssh git zsh curl wget rsync jq
+
+echo "==> Generating SSH key..."
+mkdir -p ~/.ssh
+if [ ! -f ~/.ssh/id_ed25519 ]; then
+ ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N "" -C "osaka-termux"
+ echo ""
+ echo "╔══════════════════════════════════════════════════════════╗"
+ echo "║ Add this public key to your homelab config: ║"
+ echo "╚══════════════════════════════════════════════════════════╝"
+ echo ""
+ cat ~/.ssh/id_ed25519.pub
+ echo ""
+ echo "Add it to globals.nix ssh.vincent and rebuild."
+ echo ""
+else
+ echo "SSH key already exists, skipping."
+fi
+
+echo "==> Cloning home repo..."
+REPO_DIR="$HOME/src/home"
+if [ ! -d "$REPO_DIR" ]; then
+ mkdir -p "$HOME/src"
+ # First clone uses the VPN IP directly since SSH config isn't set up yet
+ echo "You need to add the SSH key first. Once added, run:"
+ echo " git clone git@github.com:<user>/home.git ~/src/home"
+ echo ""
+ echo "Then run: ~/src/home/dots/config/boox/sync.sh"
+else
+ echo "Repo already cloned."
+fi
+
+echo "==> Setting up Termux properties..."
+mkdir -p ~/.termux
+cp "$REPO_DIR/dots/config/boox/termux.properties" ~/.termux/termux.properties 2>/dev/null || true
+cp "$REPO_DIR/dots/config/boox/colors.properties" ~/.termux/colors.properties 2>/dev/null || true
+
+echo "==> Setting zsh as default shell..."
+chsh -s zsh 2>/dev/null || true
+
+echo "==> Done! Restart Termux."
dots/config/boox/colors.properties
@@ -0,0 +1,38 @@
+# High contrast theme for e-ink display
+# Pure black on white — best for e-ink readability
+
+foreground = #000000
+background = #FFFFFF
+cursor = #000000
+
+# Black
+color0 = #000000
+color8 = #444444
+
+# Red
+color1 = #000000
+color9 = #333333
+
+# Green
+color2 = #000000
+color10 = #333333
+
+# Yellow
+color3 = #000000
+color11 = #333333
+
+# Blue
+color4 = #000000
+color12 = #333333
+
+# Magenta
+color5 = #000000
+color13 = #333333
+
+# Cyan
+color6 = #000000
+color14 = #333333
+
+# White
+color7 = #FFFFFF
+color15 = #FFFFFF
dots/config/boox/ssh_config
@@ -0,0 +1,84 @@
+# Boox (osaka) SSH config — generated from homelab globals
+# Simplified: no FIDO2, no shpool, plain ed25519 key
+
+Host *
+ ServerAliveInterval 60
+ AddKeysToAgent yes
+ IdentityFile ~/.ssh/id_ed25519
+ StrictHostKeyChecking accept-new
+
+# === Homelab (VPN) ===
+
+Host athena.vpn
+ HostName 10.100.0.83
+ User vincent
+
+Host demeter.vpn
+ HostName 10.100.0.82
+ User vincent
+
+Host rhea.vpn
+ HostName 10.100.0.50
+ User vincent
+
+Host aion.vpn
+ HostName 10.100.0.49
+ User vincent
+
+Host kerkouane.vpn
+ HostName 10.100.0.1
+ User vincent
+
+Host shikoku.vpn
+ HostName 10.100.0.2
+ User vincent
+
+Host nagoya.vpn
+ HostName 10.100.0.80
+ User vincent
+
+Host kyushu.vpn
+ HostName 10.100.0.17
+ User vincent
+
+Host aomi.vpn
+ HostName 10.100.0.17
+ User vincent
+
+Host sakhalin.vpn
+ HostName 10.100.0.16
+ User vincent
+
+Host okinawa.vpn
+ HostName 10.100.0.14
+ User vincent
+
+Host wakasu.vpn
+ HostName 10.100.0.8
+ User vincent
+
+Host hass.vpn
+ HostName 10.100.0.81
+ User vincent
+
+Host aix.vpn
+ HostName 10.100.0.89
+ User vincent
+
+Host carthage.vpn
+ HostName 10.100.0.1
+ User vincent
+
+# === Git forges ===
+
+Host github.com
+ User git
+ IdentityFile ~/.ssh/id_ed25519
+
+Host gitlab.com
+ User git
+ IdentityFile ~/.ssh/id_ed25519
+
+Host codeberg.org
+ User git
+ IdentityFile ~/.ssh/id_ed25519
dots/config/boox/sync.sh
@@ -0,0 +1,36 @@
+#!/data/data/com.termux/files/usr/bin/bash
+# Sync Boox Termux config from the home repo
+# Run after cloning: ~/src/home/dots/config/boox/sync.sh
+set -euo pipefail
+
+BOOX_DIR="$HOME/src/home/dots/config/boox"
+
+if [ ! -d "$BOOX_DIR" ]; then
+ echo "Error: home repo not found at ~/src/home"
+ echo "Clone it first: git clone <repo> ~/src/home"
+ exit 1
+fi
+
+echo "==> Syncing SSH config..."
+mkdir -p ~/.ssh
+chmod 700 ~/.ssh
+ln -snf "$BOOX_DIR/ssh_config" ~/.ssh/config
+chmod 600 ~/.ssh/config 2>/dev/null || true
+
+echo "==> Syncing Termux config..."
+mkdir -p ~/.termux
+ln -snf "$BOOX_DIR/termux.properties" ~/.termux/termux.properties
+ln -snf "$BOOX_DIR/colors.properties" ~/.termux/colors.properties
+# Font (optional - uncomment if you add a font.ttf)
+# ln -snf "$BOOX_DIR/font.ttf" ~/.termux/font.ttf
+
+echo "==> Syncing shell config..."
+ln -snf "$BOOX_DIR/zshrc" ~/.zshrc
+
+echo "==> Reloading Termux settings..."
+termux-reload-settings 2>/dev/null || true
+
+echo "==> Pulling latest from repo..."
+(cd ~/src/home && git pull --ff-only 2>/dev/null || echo " ⚠️ Could not fast-forward, run git pull manually")
+
+echo "✅ Sync complete!"
dots/config/boox/termux.properties
@@ -0,0 +1,26 @@
+# Termux properties for Boox e-ink tablet
+
+# Extra keys row — useful on e-ink where virtual keyboard is clunky
+extra-keys = [['ESC','/','-','HOME','UP','END','PGUP'],['TAB','CTRL','ALT','LEFT','DOWN','RIGHT','PGDN']]
+
+# Bell — vibrate only (no sound on e-ink)
+bell-character = vibrate
+
+# Terminal
+terminal-margin-horizontal = 3
+terminal-margin-vertical = 3
+
+# Keyboard
+enforce-char-based-input = true
+
+# Handle links
+terminal-onclick-url-open = true
+
+# Session — don't kill on close
+allow-external-apps = true
+
+# Fullscreen — better for e-ink screen real estate
+fullscreen = true
+
+# Back key behavior
+back-key = escape
dots/config/boox/zshrc
@@ -0,0 +1,56 @@
+# Boox (osaka) Termux zsh config — lightweight for e-ink
+
+# Prompt — simple, no fancy unicode/colors (e-ink friendly)
+PROMPT='%~ %# '
+
+# History
+HISTFILE=~/.zsh_history
+HISTSIZE=5000
+SAVEHIST=5000
+setopt SHARE_HISTORY
+setopt HIST_IGNORE_DUPS
+setopt HIST_IGNORE_SPACE
+
+# Completion
+autoload -Uz compinit && compinit -C
+zstyle ':completion:*' menu select
+
+# Key bindings
+bindkey -e
+bindkey '^[[A' up-line-or-search
+bindkey '^[[B' down-line-or-search
+
+# === Aliases ===
+
+# Homelab SSH shortcuts
+alias athena='ssh athena.vpn'
+alias demeter='ssh demeter.vpn'
+alias rhea='ssh rhea.vpn'
+alias aion='ssh aion.vpn'
+alias kerkouane='ssh kerkouane.vpn'
+alias shikoku='ssh shikoku.vpn'
+alias nagoya='ssh nagoya.vpn'
+alias kyushu='ssh kyushu.vpn'
+alias aomi='ssh aomi.vpn'
+alias sakhalin='ssh sakhalin.vpn'
+alias okinawa='ssh okinawa.vpn'
+alias wakasu='ssh wakasu.vpn'
+
+# General
+alias ll='ls -la'
+alias la='ls -A'
+alias l='ls -CF'
+alias ..='cd ..'
+alias ...='cd ../..'
+
+# Git
+alias gs='git status'
+alias gl='git log --oneline -20'
+alias gp='git pull --ff-only'
+
+# Sync config from repo
+alias boox-sync='~/src/home/dots/config/boox/sync.sh'
+
+# Quick access
+alias home='cd ~/src/home'
+alias org='cd ~/storage/shared/Org'
globals.nix
@@ -16,6 +16,8 @@ _: {
# Host keys (trusted machines)
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILJmTdMKYdgqpbQWBif58VBuwX+GqMGsMfB1ey1TKrM3 vincent@aomi"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGThdcaPfIaB7d+K5uODqEusLKGI5ZCye0aNOCaMoInO Kyushu's ssh key"
+ # Boox (osaka) Termux
+ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICa0SyAspL7PBPudCjb7oCBG17WRmYnDQF7/BYkFwqDi oksaka-termux"
];
};
syncthingFolders = {