improvements
This commit is contained in:
@@ -62,6 +62,9 @@ in {
|
||||
|
||||
# Gaming
|
||||
"steam"
|
||||
|
||||
# Web
|
||||
"zen"
|
||||
];
|
||||
description = "Homebrew casks to install only on personal machines";
|
||||
};
|
||||
@@ -78,6 +81,8 @@ in {
|
||||
# Communication
|
||||
"slack"
|
||||
"pritunl"
|
||||
"google-chrome"
|
||||
"cursor"
|
||||
];
|
||||
description = "Homebrew casks to install only on work machines";
|
||||
};
|
||||
@@ -96,9 +101,9 @@ in {
|
||||
# These are from custom taps or preferred from Homebrew
|
||||
"coder/coder/coder"
|
||||
"fluxcd/tap/flux"
|
||||
"nvm"
|
||||
"sst/tap/opencode"
|
||||
"tree-sitter-cli"
|
||||
"borders"
|
||||
];
|
||||
description = "Homebrew formulae to install (for packages not in nixpkgs)";
|
||||
};
|
||||
@@ -158,6 +163,8 @@ in {
|
||||
# Formulae (CLI tools from Homebrew)
|
||||
brews = cfg.brews;
|
||||
|
||||
caskArgs.no_quarantine = true;
|
||||
|
||||
# Casks (GUI applications)
|
||||
casks =
|
||||
cfg.casks.shared
|
||||
|
||||
@@ -169,4 +169,4 @@ in {
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
duf # A better df alternative
|
||||
hyperfine # A command-line benchmarking tool.
|
||||
choose # A human-friendly and fast alternative to cut and (sometimes) awk
|
||||
yazi # File manager
|
||||
|
||||
# ========================================================================
|
||||
# File and Text Utilities
|
||||
@@ -65,6 +66,7 @@
|
||||
python313 # Python 3.13
|
||||
# pyenv is configured in shell.nix
|
||||
uv # Fast Python package installer
|
||||
mise # tool manager
|
||||
|
||||
# Build Tools
|
||||
gnumake # Make build tool
|
||||
@@ -117,6 +119,9 @@
|
||||
tldr # Simplified man pages
|
||||
doggo # Command-line DNS client for humans. dig on steroids
|
||||
btop # A monitor of resources
|
||||
gh
|
||||
mob
|
||||
zsh-fast-syntax-highlighting
|
||||
|
||||
# ========================================================================
|
||||
# Nix Tools
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
# - Zoxide for smart directory navigation
|
||||
# - Shell aliases from the chezmoi configuration
|
||||
# - Environment variables
|
||||
# - NVM for Node.js version management
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
@@ -40,6 +39,13 @@
|
||||
share = true;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||
}
|
||||
];
|
||||
|
||||
# Session variables (migrated from dot_zshrc and 01-env.sh)
|
||||
sessionVariables = {
|
||||
# XDG runtime directory
|
||||
@@ -76,12 +82,26 @@
|
||||
grep = "rg";
|
||||
diff = "delta";
|
||||
less = "bat";
|
||||
g = "git";
|
||||
k = "kubectl --all-namespaces";
|
||||
ssh = "TERM=screen ssh";
|
||||
|
||||
# Neovim alias (from 01-nvim.sh)
|
||||
vim = "nvim";
|
||||
vi = "nvim";
|
||||
|
||||
# Git root navigation (from 01-env.sh)
|
||||
gr = "if [ \"`git rev-parse --show-cdup`\" != \"\" ]; then cd `git rev-parse --show-cdup`; fi";
|
||||
|
||||
# Misc
|
||||
psf = "ps -aux | grep";
|
||||
|
||||
# Docker
|
||||
docloc = "docker run --rm -it -v `PWD`:/usr/workdir --workdir=/usr/workdir";
|
||||
|
||||
# Nix
|
||||
nsh = "nix-shell";
|
||||
nse = "nix search nixpkgs";
|
||||
};
|
||||
|
||||
# Additional initialization (initExtra)
|
||||
@@ -90,21 +110,23 @@
|
||||
# Source custom env file if it exists
|
||||
[ -f ~/.env ] && source ~/.env
|
||||
|
||||
# NVM initialization
|
||||
# Load NVM if installed via Homebrew
|
||||
if [ -s "/opt/homebrew/opt/nvm/nvm.sh" ]; then
|
||||
source "/opt/homebrew/opt/nvm/nvm.sh"
|
||||
fi
|
||||
# Load NVM bash completion
|
||||
if [ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ]; then
|
||||
source "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"
|
||||
fi
|
||||
|
||||
# Pinentry configuration for SSH sessions
|
||||
if [[ -n "$SSH_CONNECTION" ]]; then
|
||||
export PINENTRY_USER_DATA="USE_CURSES=1"
|
||||
fi
|
||||
|
||||
function cd() {
|
||||
builtin cd $*
|
||||
ls
|
||||
}
|
||||
|
||||
function mkd() {
|
||||
mkdir $1
|
||||
builtin cd $1
|
||||
}
|
||||
|
||||
function take() { builtin cd $(mktemp -d) }
|
||||
|
||||
# Welcome banner (from dot_zshrc)
|
||||
# Only show if terminal is wide enough
|
||||
if [ `tput cols` -gt "70" ]; then
|
||||
@@ -162,8 +184,13 @@
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# Starship configuration can be customized here
|
||||
# settings = { };
|
||||
settings = {
|
||||
add_newline = false;
|
||||
character = {
|
||||
success_symbol = "[λ](bold green)";
|
||||
error_symbol = "[λ](bold red)";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# ==========================================================================
|
||||
@@ -223,4 +250,77 @@
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
|
||||
programs.pet = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.mise = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
settings = {
|
||||
experimental = true;
|
||||
verbose = false;
|
||||
auto_install = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.activation.setupMise = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
# use the virtual environment created by uv
|
||||
# ${pkgs.mise}/bin/mise settings set python.uv_venv_auto true
|
||||
|
||||
# enable corepack (pnpm, yarn, etc.)
|
||||
${pkgs.mise}/bin/mise set MISE_NODE_COREPACK=true
|
||||
|
||||
# disable warning about */.node-version files
|
||||
${pkgs.mise}/bin/mise settings add idiomatic_version_file_enable_tools "[]"
|
||||
|
||||
# set global tool versions (auto_install will handle installation)
|
||||
${pkgs.mise}/bin/mise use --global node@lts
|
||||
${pkgs.mise}/bin/mise use --global bun@latest
|
||||
${pkgs.mise}/bin/mise use --global deno@latest
|
||||
${pkgs.mise}/bin/mise use --global uv@latest
|
||||
'';
|
||||
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
# The config.nu can be anywhere you want if you like to edit your Nushell with Nu
|
||||
# configFile.source = ./.../config.nu;
|
||||
# for editing directly to config.nu
|
||||
extraConfig = ''
|
||||
let carapace_completer = {|spans|
|
||||
carapace $spans.0 nushell ...$spans | from json
|
||||
}
|
||||
$env.config = {
|
||||
show_banner: false,
|
||||
completions: {
|
||||
case_sensitive: false # case-sensitive completions
|
||||
quick: true # set to false to prevent auto-selecting completions
|
||||
partial: true # set to false to prevent partial filling of the prompt
|
||||
algorithm: "fuzzy" # prefix or fuzzy
|
||||
external: {
|
||||
# set to false to prevent nushell looking into $env.PATH to find more suggestions
|
||||
enable: true
|
||||
# set to lower can improve completion performance at the cost of omitting some options
|
||||
max_results: 100
|
||||
completer: $carapace_completer # check 'carapace_completer'
|
||||
}
|
||||
}
|
||||
}
|
||||
$env.PATH = ($env.PATH |
|
||||
split row (char esep) |
|
||||
append /usr/bin/env
|
||||
)
|
||||
'';
|
||||
shellAliases = {
|
||||
vi = "hx";
|
||||
vim = "hx";
|
||||
nano = "hx";
|
||||
};
|
||||
};
|
||||
programs.carapace = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user