feat: update tooling
This commit is contained in:
1 parent
7b4717a308
commit
939ec4fdf6
9 files changed
+129
-13
No files matched your search
@@ -0,0 +1,43 @@
|
|||||||
|
# Dotfiles
|
||||||
|
|
||||||
|
Managed via Home Manager (`home.nix`). Applied using `./apply.sh`.
|
||||||
|
|
||||||
|
## Packages
|
||||||
|
|
||||||
|
**Shell & Core**
|
||||||
|
- `nushell` - Primary shell
|
||||||
|
- `zellij` - Terminal multiplexer (unlock-first mode)
|
||||||
|
- `starship` - Prompt
|
||||||
|
- `atuin` - History sync (local-only)
|
||||||
|
- `zoxide` - Directory jumper
|
||||||
|
- `carapace` - Multi-shell completions
|
||||||
|
- `television` - Fuzzy finder
|
||||||
|
|
||||||
|
**CLI Utilities**
|
||||||
|
- `neovim` - Editor
|
||||||
|
- `git`, `lazygit` - Version control
|
||||||
|
- `ripgrep` (`rg`), `fd` - Fast search
|
||||||
|
- `pay-respects` - Command correction (`f`)
|
||||||
|
- `sops`, `age` - Secret management
|
||||||
|
- `curl`, `wget`, `unp`, `fastfetch`
|
||||||
|
|
||||||
|
**Runtimes & Tooling**
|
||||||
|
- `mise` - Project tool/runtime manager
|
||||||
|
- `rustup`, `cargo-binstall` - Rust toolchain
|
||||||
|
- `python3`, `pipx`, `uv` - Python toolchain
|
||||||
|
- `nodejs`, `bun` - JS toolchain
|
||||||
|
|
||||||
|
## Keymaps
|
||||||
|
|
||||||
|
**Nushell**
|
||||||
|
- `Ctrl-T` : Fuzzy find / open via Television
|
||||||
|
- `Ctrl-R` : Search shell history via Atuin
|
||||||
|
- `f` : Auto-correct previous command (Pay Respects)
|
||||||
|
- `cd` : Overridden to resolve real paths first, then falls back to `zoxide` (also aliased to `z`)
|
||||||
|
- `lg` : Launch Lazygit
|
||||||
|
|
||||||
|
**Zellij** (Defaults to locked mode)
|
||||||
|
- `Ctrl-Shift-F` : Keybind cheat sheet (zellij-forgot)
|
||||||
|
- `Ctrl-Shift-S` : Session manager (switch/create)
|
||||||
|
- `Ctrl-Shift-P` : Project launcher via Zoxide (zsm)
|
||||||
|
- `Alt-T` : Toggle scratchpad floating pane
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "=> Ensuring local config stubs exist..."
|
||||||
|
touch ~/.local_env.nu ~/.local.nu
|
||||||
|
|
||||||
|
echo "=> Running smoke test on Nushell config..."
|
||||||
|
nu -c "source ~/.dotfiles/config/nushell/env.nu; source ~/.dotfiles/config/nushell/config.nu" || {
|
||||||
|
echo "Smoke test failed! Fix Nushell config errors before applying."
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "=> Smoke test passed. Applying home-manager configuration..."
|
||||||
|
home-manager switch --flake . -b backup
|
||||||
|
echo "=> Done."
|
||||||
@@ -7,3 +7,6 @@ background-blur = true
|
|||||||
auto-update = check
|
auto-update = check
|
||||||
shell-integration = nushell
|
shell-integration = nushell
|
||||||
shell-integration-features = ssh-env,ssh-terminfo
|
shell-integration-features = ssh-env,ssh-terminfo
|
||||||
|
|
||||||
|
[profile recovery]
|
||||||
|
command = nu --no-config-file
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
# Pattern for on-demand secrets
|
||||||
|
def with-secret [secret_name: string, block: closure] {
|
||||||
|
# Example: let val = (sops -d $"~/.secrets/($secret_name)")
|
||||||
|
# For now, placeholder:
|
||||||
|
let val = "REDACTED"
|
||||||
|
with-env { SECRET_VAL: $val } {
|
||||||
|
do $block
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -108,18 +108,19 @@ source $"($nu.cache-dir)/atuin.nu"
|
|||||||
# Scripts
|
# Scripts
|
||||||
# -------
|
# -------
|
||||||
|
|
||||||
overlay use ~/.config/nushell/scripts/git/mod.nu
|
source autoload/secrets.nu
|
||||||
overlay use ~/.config/nushell/scripts/alias-finder.nu
|
overlay use scripts/git/mod.nu
|
||||||
|
overlay use scripts/alias-finder.nu
|
||||||
|
|
||||||
source ~/.config/nushell/scripts/commands.nu
|
source scripts/commands.nu
|
||||||
|
|
||||||
#source ~/.config/nushell/vendor/autoload/wt.nu
|
#source vendor/autoload/wt.nu
|
||||||
|
|
||||||
#-----------------
|
#-----------------
|
||||||
# Completion files
|
# Completion files
|
||||||
#-----------------
|
#-----------------
|
||||||
|
|
||||||
source ~/.config/nushell/completions/pm.nu
|
source completions/pm.nu
|
||||||
|
|
||||||
#----------------
|
#----------------
|
||||||
# Custom Banner
|
# Custom Banner
|
||||||
@@ -175,3 +176,43 @@ def banner [] {
|
|||||||
print ""
|
print ""
|
||||||
}
|
}
|
||||||
banner
|
banner
|
||||||
|
|
||||||
|
#----------------
|
||||||
|
# Custom Commands
|
||||||
|
#----------------
|
||||||
|
|
||||||
|
def reload-shell [] { exec nu }
|
||||||
|
|
||||||
|
alias f = pay-respects
|
||||||
|
alias cd = z
|
||||||
|
|
||||||
|
#----------------
|
||||||
|
# Keybindings
|
||||||
|
#----------------
|
||||||
|
|
||||||
|
$env.config.keybindings = (
|
||||||
|
$env.config.keybindings? | default [] | append [
|
||||||
|
{
|
||||||
|
name: television
|
||||||
|
modifier: control
|
||||||
|
keycode: char_t
|
||||||
|
mode: [emacs, vi_insert, vi_normal]
|
||||||
|
event: {
|
||||||
|
send: executehostcommand
|
||||||
|
cmd: "commandline edit --insert (tv | str trim)"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Load machine-local config if it exists
|
||||||
|
source "~/.local.nu"
|
||||||
|
|
||||||
|
# Shadow warning for critical commands
|
||||||
|
let crit_cmds = ["git" "nu"]
|
||||||
|
for cmd in $crit_cmds {
|
||||||
|
let p = (which $cmd | get path | get 0? | default "")
|
||||||
|
if ($p | str contains ".local/share/mise/installs") {
|
||||||
|
print $"[Warning] Critical command '($cmd)' is shadowed by mise: ($p)"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -97,3 +97,9 @@ if $mise_bin != null {
|
|||||||
add-hook hooks.pre_prompt $mise_hook
|
add-hook hooks.pre_prompt $mise_hook
|
||||||
add-hook hooks.env_change.PWD $mise_hook
|
add-hook hooks.env_change.PWD $mise_hook
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Deduplicate PATH at the end
|
||||||
|
$env.PATH = ($env.PATH | uniq)
|
||||||
|
|
||||||
|
# Load machine-local env if it exists
|
||||||
|
source "~/.local_env.nu"
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
keychain --eval --quiet ...(ls ~/.ssh | where name !~ '.pub$' and name !~ 'known_hosts' and name !~ 'config' and name !~ 'sockets' | get name)
|
|
||||||
| lines
|
|
||||||
| where not ($it | is-empty)
|
|
||||||
| parse "{k}={v}; export {k2};"
|
|
||||||
| select k v
|
|
||||||
| transpose --header-row
|
|
||||||
| into record
|
|
||||||
| load-env
|
|
||||||
@@ -3,6 +3,8 @@ theme "catppuccin-mocha"
|
|||||||
theme_dark "catppuccin-mocha"
|
theme_dark "catppuccin-mocha"
|
||||||
theme_light "catppuccin-latte"
|
theme_light "catppuccin-latte"
|
||||||
|
|
||||||
|
default_mode "locked"
|
||||||
|
|
||||||
// === KEYBINDINGS ===
|
// === KEYBINDINGS ===
|
||||||
keybinds {
|
keybinds {
|
||||||
shared_except "locked" {
|
shared_except "locked" {
|
||||||
|
|||||||
Reference in new issue
Block a user