The general configuration of my development environment and many other general computer things.

Add nushell configuration

dekker.one 0a700f76 86e71144

verified
+109 -1
+6
.chezmoiexternal.toml
··· 1 + [".cache/nu_scripts"] 2 + type = "archive" 3 + url = "https://github.com/nushell/nu_scripts/archive/refs/heads/main.tar.gz" 4 + exact = true 5 + stripComponents = 1 6 + refreshPeriod = "168h"
+1 -1
dot_config/kitty/kitty.conf
··· 9 9 10 10 confirm_os_window_close 0 11 11 12 - shell xonsh 12 + shell nu 13 13 14 14 # BEGIN_KITTY_THEME 15 15 # Catppuccin-Latte
+6
private_Library/private_Application Support/nushell/config.nu
··· 1 + let-env config = ($env.config | upsert show_banner false) 2 + let-env config = ($env.config | upsert rm.always_trash true) 3 + let-env config = ($env.config | upsert edit_mode vi) 4 + let-env config = ($env.config | upsert history.max_size 100000) 5 + let-env config = ($env.config | upsert footer_mode auto) 6 + let-env config = ($env.config | upsert history.file_format "sqlite")
+84
private_Library/private_Application Support/nushell/env.nu
··· 1 + # Nushell Environment Config File 2 + 3 + ### Load standardised prompt "starship" 4 + # TEMP: Custom vi prompt indicators 5 + let-env PROMPT_INDICATOR_VI_INSERT = "" 6 + let-env PROMPT_INDICATOR_VI_NORMAL = "" 7 + source ~/.cache/starship/init.nu 8 + 9 + # Specifies how environment variables are: 10 + # - converted from a string to a value on Nushell startup (from_string) 11 + # - converted from a value back to a string when running external commands (to_string) 12 + # Note: The conversions happen *after* config.nu is loaded 13 + let-env ENV_CONVERSIONS = { 14 + "PATH": { 15 + from_string: { |s| $s | split row (char esep) | path expand --no-symlink } 16 + to_string: { |v| $v | path expand --no-symlink | str join (char esep) } 17 + } 18 + } 19 + 20 + # Directories to search for scripts when calling source or use 21 + # 22 + # By default, <nushell-config-dir>/scripts is added 23 + let-env NU_LIB_DIRS = [ ($nu.default-config-dir | path join 'scripts') ] 24 + 25 + # Directories to search for plugin binaries when calling register 26 + # 27 + # By default, <nushell-config-dir>/plugins is added 28 + let-env NU_PLUGIN_DIRS = [ ($nu.default-config-dir | path join 'plugins') ] 29 + 30 + 31 + # Add entries to PATH: 32 + # From MacOS helper (/usr/libexec/path_helper) 33 + let-env PATH = ($env.PATH | split row (char esep) | append "/Library/TeX/texbin") 34 + let-env PATH = ($env.PATH | split row (char esep) | append "/Library/Apple/usr/bin") 35 + let-env PATH = ($env.PATH | split row (char esep) | append "/opt/homebrew/bin") 36 + let-env PATH = ($env.PATH | split row (char esep) | append "/opt/homebrew/sbin") 37 + let-env PATH = ($env.PATH | split row (char esep) | append "/usr/local/bin") 38 + # Optional Homebrew packages 39 + let-env PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/bison/bin") 40 + let-env PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/flex/bin") 41 + let-env PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/llvm/bin") 42 + let-env PATH = ($env.PATH | split row (char esep) | prepend $"(brew --prefix | str trim)/opt/openjdk/bin") 43 + # Other package managers 44 + let-env PATH = ($env.PATH | split row (char esep) | prepend $"($env.HOME)/.local/bin") 45 + let-env PATH = ($env.PATH | split row (char esep) | prepend $"($env.HOME)/.cargo/bin") 46 + 47 + # --- user custom --- 48 + # Set default editor 49 + let-env EDITOR = "nvim" 50 + let-env VISUAL = "codium" 51 + # Alias for Monash compute cluster 52 + let-env OPTCLUSTER = "compute.optimisation-2020.cloud.edu.au" 53 + # CMake settings 54 + let-env CMAKE_EXPORT_COMPILE_COMMANDS = "1" # output compile-commands.json for clangd 55 + let-env CMAKE_GENERATOR = "Ninja Multi-Config" # use Ninja generator by default 56 + let-env CMAKE_C_COMPILER_LAUNCHER = "ccache" 57 + let-env CMAKE_CXX_COMPILER_LAUNCHER = "ccache" 58 + # Homebrew shell setup (brew shellenv) 59 + let-env HOMEBREW_PREFIX = "/opt/homebrew" 60 + let-env HOMEBREW_CELLAR = "/opt/homebrew/Cellar" 61 + let-env HOMEBREW_REPOSITORY = "/opt/homebrew" 62 + let-env INFOPATH = "/opt/homebrew/share/info" 63 + # Set MANPATH 64 + let-env MANPATH = "/usr/share/man:/usr/local/share/man:/Library/TeX/Distributions/.DefaultTeX/Contents/Man:/opt/homebrew/share/man" 65 + 66 + ### Setup aliases 67 + alias edit = ^($env.VISUAL) 68 + alias start = ^open 69 + alias less = bat 70 + alias set-light-theme = kitty +kitten themes Catppuccin-Latte 71 + alias set-dark-theme = kitty +kitten themes Catppuccin-Macchiato 72 + alias brew-backup = brew bundle dump --global --no-lock --cask --mas --tap --force 73 + alias brew-cleanup = brew bundle cleanup --global --no-lock --force --zap 74 + alias brew-restore = brew bundle install --global --no-lock 75 + 76 + # Load autojump plugin "zoxide" 77 + source ~/.cache/zoxide/zoxide.nu 78 + 79 + # Load completions 80 + source ~/.cache/nu_scripts/custom-completions/cargo/cargo-completions.nu 81 + source ~/.cache/nu_scripts/custom-completions/git/git-completions.nu 82 + source ~/.cache/nu_scripts/custom-completions/make/make-completions.nu 83 + source ~/.cache/nu_scripts/custom-completions/npm/npm-completions.nu 84 + source ~/.cache/nu_scripts/custom-completions/typst/typst-completions.nu
+12
run_nushell_generation.nu
··· 1 + #!/usr/bin/env nu 2 + 3 + # Generate zoxide configuration 4 + if (which zoxide | is-empty) == false { 5 + mkdir ~/.cache/zoxide/ 6 + zoxide init nushell --hook prompt | save --force ~/.cache/zoxide/zoxide.nu 7 + } 8 + 9 + if (which starship | is-empty) == false { 10 + mkdir ~/.cache/starship/ 11 + starship init nu | save --force ~/.cache/starship/init.nu 12 + }