This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/config/nushell/env.nu
T
2026-08-13 10:47:55 +02:00

47 lines
1.7 KiB
Nu

$env.__NU_START_TIME = (date now)
use std *
path add ~/.cargo/bin
path add ~/.local/bin
path add ~/go/bin
path add ~/.local/share/bob/nvim-bin
path add ~/.nix-profile/bin
$env.SHELL = '/usr/bin/nu'
$env.ZELLIJ_SOCKET_DIR = '/tmp/zellij'
$env.RAINFROG_CONFIG = '~/.config/rainfrog'
if ($nu.os-info.name == 'macos') {
path add /opt/homebrew/bin
path add ~/.orbstack/bin
path add ~/.rustup/toolchains/nightly-aarch64-apple-darwin/bin
path add /Applications/lux-cli.app/Contents/MacOS
path add /nix/var/nix/profiles/default/bin
$env.SHELL = '/opt/homebrew/bin/nu'
$env.XDG_RUNTIME_DIR = "/tmp/"
}
if not ($nu.cache-dir | path exists) {
mkdir $"($nu.cache-dir)"
}
if (which starship | is-not-empty) { starship init nu | save -f $"($nu.cache-dir)/starship.nu" } else { "" | save -f $"($nu.cache-dir)/starship.nu" }
if (which zoxide | is-not-empty) { zoxide init nushell | save -f $"($nu.cache-dir)/zoxide.nu" } else { "" | save -f $"($nu.cache-dir)/zoxide.nu" }
if (which atuin | is-not-empty) { atuin init nu | save -f $"($nu.cache-dir)/atuin.nu" } else { "" | save -f $"($nu.cache-dir)/atuin.nu" }
$env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense'
if (which carapace | is-not-empty) { ^carapace _carapace nushell | str replace '$env.config = $current' '$env.config = ($env.config? | default {} | merge $current)' | save -f $"($nu.cache-dir)/carapace.nu" } else { "" | save -f $"($nu.cache-dir)/carapace.nu" }
if (which mise | is-not-empty) {
# mise activate nu | save -f $"($nu.cache-dir)/mise.nu"
} else {
"" | save -f $"($nu.cache-dir)/mise.nu"
}
# Deduplicate PATH at the end
$env.PATH = ($env.PATH | uniq)
# Load machine-local env if it exists
source "~/.local_env.nu"