feat: update tooling

This commit is contained in:
johannes committed 2026-07-29 23:42:19 +02:00
1 parent 7b4717a308
commit 939ec4fdf6
9 files changed
+129 -13

No files matched your search

+3
View File
@@ -7,3 +7,6 @@ background-blur = true
auto-update = check
shell-integration = nushell
shell-integration-features = ssh-env,ssh-terminfo
[profile recovery]
command = nu --no-config-file
+9
View 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
}
}
+46 -5
View File
@@ -108,18 +108,19 @@ source $"($nu.cache-dir)/atuin.nu"
# Scripts
# -------
overlay use ~/.config/nushell/scripts/git/mod.nu
overlay use ~/.config/nushell/scripts/alias-finder.nu
source autoload/secrets.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
#-----------------
source ~/.config/nushell/completions/pm.nu
source completions/pm.nu
#----------------
# Custom Banner
@@ -175,3 +176,43 @@ def banner [] {
print ""
}
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)"
}
}
+6
View File
@@ -97,3 +97,9 @@ if $mise_bin != null {
add-hook hooks.pre_prompt $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"
-8
View File
@@ -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
+2
View File
@@ -3,6 +3,8 @@ theme "catppuccin-mocha"
theme_dark "catppuccin-mocha"
theme_light "catppuccin-latte"
default_mode "locked"
// === KEYBINDINGS ===
keybinds {
shared_except "locked" {