add .local/bin to nu path

This commit is contained in:
2025-10-29 13:56:54 +09:00
parent 605c1b4ea3
commit a196e47fb7
3 changed files with 20 additions and 1 deletions

View File

@@ -1,10 +1,11 @@
{ ... }: { { ... }: {
home.file.".config/nushell/nu".source = ../../shell/nu;
programs = { programs = {
nushell = { nushell = {
enable = true; enable = true;
configFile.source = ../../shell/config.nu;
shellAliases = { vi = "nvim"; }; shellAliases = { vi = "nvim"; };
extraConfig = '' extraConfig = ''
source ~/.config/nushell/nu/config.nu
let carapace_completer = {|spans| let carapace_completer = {|spans|
carapace $spans.0 nushell ...$spans | from json carapace $spans.0 nushell ...$spans | from json
} }

View File

18
shell/nu/config.nu Normal file
View File

@@ -0,0 +1,18 @@
def line-count [row] {
open $row.path | lines | length
}
def add-line-count [row] {
$row | merge { line_count: (open $row.path | lines | length) }
}
$env.KUBECONFIG = ("/home/allen/.kube/config")
$env.PATH = ($env.PATH | append "/home/allen/.local/share/pnpm")
$env.PATH = ($env.PATH | append "/home/allen/.local/bin")
alias c = clear
alias rb = sudo nixos-rebuild switch --flake ~/nixos-config#
alias clc = cloc . --exclude-dir=target,node_modules,.venv --exclude-ext=yml,yaml,csv -v
alias lg = lazygit
alias zxcv = shutdown now
alias qwer = reboot