From 08a9b30c105c86ca378c36815a5e3bf07891fcf8 Mon Sep 17 00:00:00 2001 From: Tao Tien <29749622+taotien@users.noreply.github.com> Date: Tue, 4 Nov 2025 22:15:58 -0800 Subject: [PATCH] nushel --- extras/dev.nix | 26 ++++++++++++++------------ users/tao/HOME.nix | 3 +++ users/tao/nushell/extras/nix.nu | 23 +++++++++++++++-------- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/extras/dev.nix b/extras/dev.nix index 8f89e39..41271df 100644 --- a/extras/dev.nix +++ b/extras/dev.nix @@ -13,17 +13,6 @@ services.scx.scheduler = "scx_lavd"; # default is "scx_rustland" environment.systemPackages = with pkgs; [ - basedpyright - mergiraf - lazyjj - egglog - z3 - # cringelang - go - delve - gotools - gopls - # act # asm-lsp # bash-language-server @@ -39,16 +28,21 @@ # radicle-node # vulkan-loader b3sum + basedpyright delta devenv direnv + egglog gh + gpclient hyperfine jujutsu just just-lsp + lazyjj lldb mask + mergiraf mprocs nomachine-client presenterm @@ -60,6 +54,7 @@ tio tokei # repo code stats typos + z3 # # databases # sqlite @@ -82,6 +77,12 @@ gdb gnumake + # cringelang + go + delve + gotools + gopls + # nix nil alejandra @@ -95,8 +96,9 @@ pyright # rust - cargo-binstall bacon + cargo-binstall + cargo-edit cargo-expand cargo-feature cargo-generate diff --git a/users/tao/HOME.nix b/users/tao/HOME.nix index 8f4ebf3..c589f02 100644 --- a/users/tao/HOME.nix +++ b/users/tao/HOME.nix @@ -135,6 +135,9 @@ in { envFile.source = ./nushell/env.nu; # extraConfig = builtins.readFile ./nushell/stuff.nu; extraConfig = lib.concatStrings (map builtins.readFile (map (x: ./nushell/extras/. + x) (map (x: "/" + x) (builtins.attrNames (builtins.readDir ./nushell/extras))))); + plugins = with pkgs.nushellPlugins; [ + + ]; }; ssh = { diff --git a/users/tao/nushell/extras/nix.nu b/users/tao/nushell/extras/nix.nu index 80976c5..e2ab9a6 100644 --- a/users/tao/nushell/extras/nix.nu +++ b/users/tao/nushell/extras/nix.nu @@ -40,15 +40,21 @@ def post-rebuild [] { def bump [...rest] { cd /home/tao/projects/NOflake/ - match (jj log -r @ --no-pager --no-graph --template 'if(empty, "empty", self.description())') { - "empty" => { - jj desc -m "bump (unbuilt)" - } - "bump (unbuilt)" | "bump (failed)" => {} - _ => { - print "where to put bump?" - return + mut r = "@" + loop { + match (jj log -r $r --no-pager --no-graph --template 'if(empty, "empty", self.description())') { + "empty" => { + $r = $r + "-" + continue + } + "bump (unbuilt)" | "bump (failed)" => { + jj desc -m "bump (unbuilt)" + } + _ => { + jj new -m "bump (unbuilt)" + } } + break } let r = jj log -r @ --no-pager --no-graph --template 'change_id' sudo nix flake update @@ -58,6 +64,7 @@ def bump [...rest] { } else { jj desc -r $r -m "bump (failed)" } + jj new } alias rb = rebuild boot