diff --git a/.beads/interactions.jsonl b/.beads/interactions.jsonl index 806cab3..db84000 100644 --- a/.beads/interactions.jsonl +++ b/.beads/interactions.jsonl @@ -27,3 +27,4 @@ {"id":"int-ad1edd15","kind":"field_change","created_at":"2026-08-09T18:57:20.971643841Z","actor":"Prad Nukala","issue_id":"chezmoi-udp","extra":{"field":"status","new_value":"in_progress","old_value":"open"}} {"id":"int-eab7a82b","kind":"field_change","created_at":"2026-08-09T18:58:33.495195245Z","actor":"Prad Nukala","issue_id":"chezmoi-42m","extra":{"field":"status","new_value":"in_progress","old_value":"open"}} {"id":"int-45a90136","kind":"field_change","created_at":"2026-08-09T18:58:46.086021951Z","actor":"Prad Nukala","issue_id":"chezmoi-udp","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Simulated: every .tmpl rendered in darwin/mac mode without error; darwin ignore file gates entire arch layer (niri/noctalia/fontconfig/mimeapps/systemd/niri-launch/fish niri bits); packages script renders brew-only; gitconfig/yazi render portable. Full apply on real Mac deferred until hardware available."}} +{"id":"int-bc698341","kind":"field_change","created_at":"2026-08-10T18:09:40.450714596Z","actor":"Prad Nukala","issue_id":"chezmoi-09g","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"bash/zsh managed with starship; aliases single-sourced in .chezmoidata/aliases.yaml, rendered to fish + shell/aliases.sh; verified in all three shells"}} diff --git a/.beads/issues.jsonl b/.beads/issues.jsonl index 1769d09..704fd57 100644 --- a/.beads/issues.jsonl +++ b/.beads/issues.jsonl @@ -1,6 +1,7 @@ {"_type":"issue","id":"chezmoi-1a0","title":"Secrets audit: grep all candidate content for tokens before any chezmoi add","description":"Grep sk-, ghp_, glpat-, Bearer, token, key = across all files destined for repo. secrets.fish goes to age-encrypted encrypted_ path (key ~/.config/chezmoi/key.txt, manual distribution, document in README). Claude: never .credentials.json.","status":"closed","priority":1,"issue_type":"task","owner":"prad@sonr.io","created_at":"2026-08-09T18:41:50Z","created_by":"Prad Nukala","updated_at":"2026-08-09T18:48:14Z","started_at":"2026-08-09T18:45:28Z","closed_at":"2026-08-09T18:48:14Z","close_reason":"secrets.fish age-encrypted; plaintext purged from git history and remote force-pushed; noctalia/plugins excluded (live ghp_ token); gh hosts.yml excluded; npmrc deferred; rotation recommended","dependency_count":0,"dependent_count":3,"comment_count":0} {"_type":"issue","id":"chezmoi-byc","title":"Gating skeleton: .chezmoi.toml.tmpl + .chezmoiignore.tmpl + packages.yaml skeleton","description":"promptOnce name/email/role (desktop|laptop|mac|server); chezmoiignore gates linux-only trees on darwin and vice versa; .chezmoidata/packages.yaml skeleton {arch:{pacman,aur},darwin:{brew,cask},shared:{gh_extensions,go,cargo}}. Machinery before content.","status":"closed","priority":1,"issue_type":"task","owner":"prad@sonr.io","created_at":"2026-08-09T18:41:50Z","created_by":"Prad Nukala","updated_at":"2026-08-09T18:47:06Z","started_at":"2026-08-09T18:45:28Z","closed_at":"2026-08-09T18:47:06Z","close_reason":"Closed","dependency_count":0,"dependent_count":13,"comment_count":0} {"_type":"issue","id":"chezmoi-rnv","title":"Inventory: disposition table for all dotstate synced paths","description":"Parse .dotstate-profiles.toml (Noctalia/Inir/Rogz/Vertical-Rogz_AppleStudio). Every synced path gets decision: universal / arch-gated / defer / drop / secret. Output table in MIGRATION-NOTES.md. Blocks all content.","status":"closed","priority":1,"issue_type":"task","owner":"prad@sonr.io","created_at":"2026-08-09T18:41:50Z","created_by":"Prad Nukala","updated_at":"2026-08-09T18:45:28Z","started_at":"2026-08-09T18:44:23Z","closed_at":"2026-08-09T18:45:28Z","close_reason":"Closed","dependency_count":0,"dependent_count":13,"comment_count":0} +{"_type":"issue","id":"chezmoi-09g","title":"shell: starship + shared aliases for bash/zsh (synced with fish)","description":"aliases.yaml chezmoidata as single source; fish 20-aliases becomes tmpl; dot_config/shell/aliases.sh.tmpl for bash/zsh; managed dot_bashrc/dot_zshrc with starship init (drop flyline/p10k)","status":"closed","priority":2,"issue_type":"task","assignee":"Prad Nukala","owner":"prad@sonr.io","created_at":"2026-08-10T18:06:52Z","created_by":"Prad Nukala","updated_at":"2026-08-10T18:09:40Z","started_at":"2026-08-10T18:07:59Z","closed_at":"2026-08-10T18:09:40Z","close_reason":"bash/zsh managed with starship; aliases single-sourced in .chezmoidata/aliases.yaml, rendered to fish + shell/aliases.sh; verified in all three shells","dependency_count":0,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"chezmoi-42m","title":"Validation: Arch fresh bring-up in container","description":"docker run archlinux: bootstrap one-liner, packages install, chezmoi doctor clean, niri validate, fish -n all files, nvim --headless +Lazy! sync, tmux -f cfg new -d; kill-server, gh extension list matches manifest. Plus live machine chezmoi diff ~ empty.","status":"in_progress","priority":2,"issue_type":"task","owner":"prad@sonr.io","created_at":"2026-08-09T18:42:17Z","created_by":"Prad Nukala","updated_at":"2026-08-09T18:58:33Z","started_at":"2026-08-09T18:58:33Z","dependencies":[{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-21v","type":"blocks","created_at":"2026-08-09T14:42:58Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-4sj","type":"blocks","created_at":"2026-08-09T14:42:58Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-9sg","type":"blocks","created_at":"2026-08-09T14:42:59Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-a2k","type":"blocks","created_at":"2026-08-09T14:42:59Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-exq","type":"blocks","created_at":"2026-08-09T14:42:59Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-fde","type":"blocks","created_at":"2026-08-09T14:42:59Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-hou","type":"blocks","created_at":"2026-08-09T14:42:58Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-iu2","type":"blocks","created_at":"2026-08-09T14:42:59Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-sd9","type":"blocks","created_at":"2026-08-09T14:42:58Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-utl","type":"blocks","created_at":"2026-08-09T14:42:58Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-uw2","type":"blocks","created_at":"2026-08-09T14:42:57Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-x7f","type":"blocks","created_at":"2026-08-09T14:42:58Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-42m","depends_on_id":"chezmoi-xi5","type":"blocks","created_at":"2026-08-09T14:42:58Z","created_by":"Prad Nukala","metadata":"{}"}],"dependency_count":13,"dependent_count":1,"comment_count":0} {"_type":"issue","id":"chezmoi-5by","title":"Cutover: freeze dotstate for migrated paths","description":"After both validations: remove migrated paths from .dotstate-profiles.toml, tag dotstate pre-chezmoi-freeze, stop Dolt sync for those paths. Archive, never delete.","status":"open","priority":2,"issue_type":"task","owner":"prad@sonr.io","created_at":"2026-08-09T18:42:17Z","created_by":"Prad Nukala","updated_at":"2026-08-09T18:42:17Z","dependencies":[{"issue_id":"chezmoi-5by","depends_on_id":"chezmoi-42m","type":"blocks","created_at":"2026-08-09T14:42:25Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-5by","depends_on_id":"chezmoi-udp","type":"blocks","created_at":"2026-08-09T14:42:25Z","created_by":"Prad Nukala","metadata":"{}"}],"dependency_count":2,"dependent_count":0,"comment_count":0} {"_type":"issue","id":"chezmoi-9sg","title":"Arch layer: niri, noctalia, fontconfig, mimeapps, systemd user units — linux-gated","description":"niri config.d split preserved with exact_ dir; noctalia; fontconfig; mimeapps.list; systemd user units; foot/alacritty if live. All gated in .chezmoiignore.tmpl for darwin. niri validate must pass.","status":"closed","priority":2,"issue_type":"task","owner":"prad@sonr.io","created_at":"2026-08-09T18:42:17Z","created_by":"Prad Nukala","updated_at":"2026-08-09T18:56:09Z","started_at":"2026-08-09T18:53:56Z","closed_at":"2026-08-09T18:56:09Z","close_reason":"Closed","dependencies":[{"issue_id":"chezmoi-9sg","depends_on_id":"chezmoi-byc","type":"blocks","created_at":"2026-08-09T14:42:52Z","created_by":"Prad Nukala","metadata":"{}"},{"issue_id":"chezmoi-9sg","depends_on_id":"chezmoi-rnv","type":"blocks","created_at":"2026-08-09T14:42:52Z","created_by":"Prad Nukala","metadata":"{}"}],"dependency_count":2,"dependent_count":2,"comment_count":0} diff --git a/.chezmoidata/aliases.yaml b/.chezmoidata/aliases.yaml new file mode 100644 index 0000000..420ad8a --- /dev/null +++ b/.chezmoidata/aliases.yaml @@ -0,0 +1,41 @@ +# Shell-agnostic aliases — single source of truth, rendered into: +# dot_config/fish/conf.d/20-aliases.fish.tmpl (fish) +# dot_config/shell/aliases.sh.tmpl (bash + zsh) +# Shell-specific bits (clipboard detection, the `q` function, interactive +# eza/typo guards) live in those templates, not here. +aliases: + - section: "Editors / file managers" + items: + - { name: "e", cmd: "nvim" } + - { name: "e.d", cmd: "cd ~/.config/dotstate/storage/Rogz/.config && yazi" } + - { name: "e.f", cmd: "cd ~/.config/fish && yazi" } + - { name: "e.k", cmd: "yazi ~/.config/kitty" } + - { name: "e.n", cmd: "yazi ~/.config/niri" } + - { name: "e.v", cmd: "yazi ~/.config/nvim/lua" } + - { name: "e.y", cmd: "yazi ~/.config/yazi" } + - { name: "e.t", cmd: "nvim ~/.config/tmux/tmux.conf" } + - { name: "hx", cmd: "helix" } + - section: "Quick directory jumps" + items: + - { name: "cdc", cmd: "cd ~/.config && yazi" } + - { name: "cdd", cmd: "cd ~/Developer && yazi" } + - { name: "cdk", cmd: "cd ~/Documents/Knowledge && obsidian" } + - { name: "cdl", cmd: "cd ~/.local && yazi" } + - { name: "cds", cmd: "cd ~/.local/share/services && ls" } + - { name: "cdw", cmd: "cd ~/Downloads && yazi" } + - section: "Tools" + items: + - { name: "dd", cmd: "lazydocker" } + - { name: "gg", cmd: "lazygit" } + - { name: "ff", cmd: "exec fish" } + - { name: "npx", cmd: "bunx" } + - { name: "sm", cmd: "sudo micro" } + - { name: "sd", cmd: "ssh prad@192.168.1.68" } + - { name: "oc", cmd: "opencode" } + - { name: "gop", cmd: "gh repo view --web" } + - { name: "dss", cmd: "dotstate sync" } + - { name: "fabric", cmd: "fabric-ai" } + - { name: "bk", cmd: "bead-kanban" } + - { name: "sua", cmd: "shelly upgrade-all -n" } + - { name: "lc", cmd: "leetcode" } + - { name: "tk", cmd: "task" } diff --git a/README.md b/README.md index fc925d9..1ddc7ff 100644 --- a/README.md +++ b/README.md @@ -28,11 +28,15 @@ layer (niri, noctalia, fontconfig, systemd user units) — `mac` and ## What's managed -Universal: fish, nvim (AstroNvim), tmux, kitty, yazi, lazygit, -lazydocker, gh (+ extensions), starship, git, ssh config, Claude Code -(settings/commands/hooks/skills). Packages declared in -`.chezmoidata/packages.yaml`, installed by `.chezmoiscripts` (idempotent, -re-run when the manifest changes). +Universal: fish, bash + zsh (starship prompt, shared aliases), nvim +(AstroNvim), tmux, kitty, yazi, lazygit, lazydocker, gh (+ extensions), +starship, git, ssh config, Claude Code (settings/commands/hooks/skills). +Packages declared in `.chezmoidata/packages.yaml`, installed by +`.chezmoiscripts` (idempotent, re-run when the manifest changes). + +Aliases are defined once in `.chezmoidata/aliases.yaml` and rendered +into fish (`fish/conf.d/20-aliases.fish`) and bash/zsh +(`~/.config/shell/aliases.sh`, sourced by `.bashrc`/`.zshrc`). Linux desktop (role `desktop`/`laptop` only): niri, noctalia, fontconfig, mimeapps, systemd user units, niri-launch. diff --git a/dot_bashrc b/dot_bashrc new file mode 100644 index 0000000..4ae1ba9 --- /dev/null +++ b/dot_bashrc @@ -0,0 +1,24 @@ +# +# ~/.bashrc — managed by chezmoi +# + +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# PATH extras / tool envs (machine-optional, guarded) +[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" +[ -d "$HOME/.maestro/bin" ] && PATH="$PATH:$HOME/.maestro/bin" + +# Shared aliases (same set as fish/zsh; source of truth: .chezmoidata/aliases.yaml) +[ -f "$HOME/.config/shell/aliases.sh" ] && . "$HOME/.config/shell/aliases.sh" + +# atuin shell history (needs bash-preexec) +[ -f "$HOME/.atuin/bin/env" ] && . "$HOME/.atuin/bin/env" +[ -f "$HOME/.bash-preexec.sh" ] && . "$HOME/.bash-preexec.sh" +command -v atuin >/dev/null 2>&1 && eval "$(atuin init bash)" + +# Generated for envman. Do not edit. +[ -s "$HOME/.config/envman/load.sh" ] && . "$HOME/.config/envman/load.sh" + +# Prompt — starship, consistent with fish +command -v starship >/dev/null 2>&1 && eval "$(starship init bash)" diff --git a/dot_config/fish/conf.d/20-aliases.fish b/dot_config/fish/conf.d/20-aliases.fish deleted file mode 100644 index ddf96be..0000000 --- a/dot_config/fish/conf.d/20-aliases.fish +++ /dev/null @@ -1,66 +0,0 @@ -# Aliases - -# Editors / file managers -alias e nvim -alias e.d 'cd ~/.config/dotstate/storage/Rogz/.config && yazi' -alias e.f 'cd ~/.config/fish && yazi ' -alias e.k 'yazi ~/.config/kitty' -alias e.n 'yazi ~/.config/niri' -alias e.v 'yazi ~/.config/nvim/lua' -alias e.y 'yazi ~/.config/yazi' -alias e.t 'nvim ~/.config/tmux/tmux.conf' - -alias hx 'helix' - -# Quick directory jumps -alias cdc 'cd ~/.config && yazi' -alias cdd 'cd ~/Developer && yazi' -alias cdk 'cd ~/Documents/Knowledge && obsidian' -alias cdl 'cd ~/.local && yazi' -alias cds 'cd ~/.local/share/services && ls' -alias cdw 'cd ~/Downloads && yazi' - -# Tools -alias dd lazydocker -alias gg lazygit -alias ff 'exec fish' -alias npx bunx -if command -v wl-copy >/dev/null 2>&1 - alias cpy wl-copy - alias pst wl-paste -else if command -v pbcopy >/dev/null 2>&1 - alias cpy pbcopy - alias pst pbpaste -end -alias sm 'sudo micro' -# q exits the shell; if this shell was spawned from yazi's own `q` bind -# (`shell "$SHELL" --block`), also tell that yazi to quit so exiting -# doesn't bounce back into the file manager. -function q --description 'exit (and quit parent yazi)' - if set -q YAZI_ID; and command -q ya - ya emit quit 2>/dev/null - end - exit -end -alias sd 'ssh prad@192.168.1.68' -alias oc opencode -alias gop 'gh repo view --web' -alias dss 'dotstate sync' -alias fabric fabric-ai -alias bk bead-kanban - -alias sua 'shelly upgrade-all -n' - -alias lc 'leetcode' -alias tk 'task' - -# Interactive-only: don't override `ls` for scripts. -if status is-interactive - # `clear` is functions/clear.fish (kitty scrollback + bottom-pinned - # prompt) — don't alias it here, an alias would shadow the autoload. - alias celar clear - alias claer clear - if command -v eza >/dev/null 2>&1 - alias ls 'eza --icons' - end -end diff --git a/dot_config/fish/conf.d/20-aliases.fish.tmpl b/dot_config/fish/conf.d/20-aliases.fish.tmpl new file mode 100644 index 0000000..4fb47ec --- /dev/null +++ b/dot_config/fish/conf.d/20-aliases.fish.tmpl @@ -0,0 +1,40 @@ +# Aliases — generated from .chezmoidata/aliases.yaml (shared with bash/zsh +# via ~/.config/shell/aliases.sh). Add shell-agnostic aliases in the YAML; +# fish-only bits live below the generated block. +{{- range .aliases }} + +# {{ .section }} +{{- range .items }} +alias {{ .name }} {{ if contains " " .cmd }}'{{ .cmd }}'{{ else }}{{ .cmd }}{{ end }} +{{- end }} +{{- end }} + +# Clipboard +if command -v wl-copy >/dev/null 2>&1 + alias cpy wl-copy + alias pst wl-paste +else if command -v pbcopy >/dev/null 2>&1 + alias cpy pbcopy + alias pst pbpaste +end + +# q exits the shell; if this shell was spawned from yazi's own `q` bind +# (`shell "$SHELL" --block`), also tell that yazi to quit so exiting +# doesn't bounce back into the file manager. +function q --description 'exit (and quit parent yazi)' + if set -q YAZI_ID; and command -q ya + ya emit quit 2>/dev/null + end + exit +end + +# Interactive-only: don't override `ls` for scripts. +if status is-interactive + # `clear` is functions/clear.fish (kitty scrollback + bottom-pinned + # prompt) — don't alias it here, an alias would shadow the autoload. + alias celar clear + alias claer clear + if command -v eza >/dev/null 2>&1 + alias ls 'eza --icons' + end +end diff --git a/dot_config/shell/aliases.sh.tmpl b/dot_config/shell/aliases.sh.tmpl new file mode 100644 index 0000000..00dae6d --- /dev/null +++ b/dot_config/shell/aliases.sh.tmpl @@ -0,0 +1,36 @@ +# Shared aliases for bash and zsh — generated from .chezmoidata/aliases.yaml. +# fish renders the same data via fish/conf.d/20-aliases.fish. Edit the YAML, +# not this file. Sourced from ~/.bashrc and ~/.zshrc (interactive shells only). +{{- range .aliases }} + +# {{ .section }} +{{- range .items }} +alias {{ .name }}='{{ .cmd }}' +{{- end }} +{{- end }} + +# Clipboard +if command -v wl-copy >/dev/null 2>&1; then + alias cpy='wl-copy' + alias pst='wl-paste' +elif command -v pbcopy >/dev/null 2>&1; then + alias cpy='pbcopy' + alias pst='pbpaste' +fi + +# q exits the shell; if this shell was spawned from yazi's own `q` bind +# (`shell "$SHELL" --block`), also tell that yazi to quit so exiting +# doesn't bounce back into the file manager. +q() { + if [ -n "$YAZI_ID" ] && command -v ya >/dev/null 2>&1; then + ya emit quit 2>/dev/null + fi + exit +} + +# Typo guards + eza (this file is only sourced by interactive shells) +alias celar='clear' +alias claer='clear' +if command -v eza >/dev/null 2>&1; then + alias ls='eza --icons' +fi diff --git a/dot_zshrc b/dot_zshrc new file mode 100644 index 0000000..d4280d3 --- /dev/null +++ b/dot_zshrc @@ -0,0 +1,27 @@ +# ~/.zshrc — managed by chezmoi + +# History +HISTFILE="$HOME/.zsh_history" +HISTSIZE=10000 +SAVEHIST=10000 +setopt SHARE_HISTORY HIST_IGNORE_DUPS + +# Completion +autoload -Uz compinit && compinit + +# PATH extras / tool envs (machine-optional, guarded) +[ -f "$HOME/.cargo/env" ] && . "$HOME/.cargo/env" +[ -d "$HOME/.maestro/bin" ] && PATH="$PATH:$HOME/.maestro/bin" + +# Shared aliases (same set as fish/bash; source of truth: .chezmoidata/aliases.yaml) +[ -f "$HOME/.config/shell/aliases.sh" ] && . "$HOME/.config/shell/aliases.sh" + +# atuin shell history +[ -f "$HOME/.atuin/bin/env" ] && . "$HOME/.atuin/bin/env" +command -v atuin >/dev/null 2>&1 && eval "$(atuin init zsh)" + +# Generated for envman. Do not edit. +[ -s "$HOME/.config/envman/load.sh" ] && . "$HOME/.config/envman/load.sh" + +# Prompt — starship, consistent with fish +command -v starship >/dev/null 2>&1 && eval "$(starship init zsh)"