From a196e47fb720dadae7846857acca83f07e8bb047 Mon Sep 17 00:00:00 2001 From: minco Date: Wed, 29 Oct 2025 13:56:54 +0900 Subject: [PATCH] add .local/bin to nu path --- modules/home/nushell.nix | 3 ++- shell/config.nu | 0 shell/nu/config.nu | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) delete mode 100644 shell/config.nu create mode 100644 shell/nu/config.nu diff --git a/modules/home/nushell.nix b/modules/home/nushell.nix index d85cd78..41bbf1c 100644 --- a/modules/home/nushell.nix +++ b/modules/home/nushell.nix @@ -1,10 +1,11 @@ { ... }: { + home.file.".config/nushell/nu".source = ../../shell/nu; programs = { nushell = { enable = true; - configFile.source = ../../shell/config.nu; shellAliases = { vi = "nvim"; }; extraConfig = '' + source ~/.config/nushell/nu/config.nu let carapace_completer = {|spans| carapace $spans.0 nushell ...$spans | from json } diff --git a/shell/config.nu b/shell/config.nu deleted file mode 100644 index e69de29..0000000 diff --git a/shell/nu/config.nu b/shell/nu/config.nu new file mode 100644 index 0000000..58d1b9d --- /dev/null +++ b/shell/nu/config.nu @@ -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