diff --git a/extras/dev.nix b/extras/dev.nix index a9c261c..c3d3f94 100644 --- a/extras/dev.nix +++ b/extras/dev.nix @@ -8,6 +8,7 @@ # fontforge # radicle-node # hyperfine # benchmarking + git-cliff b3sum direnv jujutsu diff --git a/users/tao/HOME.nix b/users/tao/HOME.nix index 167fc25..3aecb1b 100644 --- a/users/tao/HOME.nix +++ b/users/tao/HOME.nix @@ -5,7 +5,7 @@ ... }: let cargoFile = builtins.readFile ./cargo.toml; - cargoConfig = builtins.replaceStrings ["path/to/sccache"] ["${pkgs.sccache}/bin/sccache"] cargoFile; + cargoConfig = builtins.replaceStrings ["/path/to/sccache" "/path/to/mold"] ["${pkgs.sccache}/bin/sccache" "${pkgs.mold}/bin/mold}"] cargoFile; in { imports = [ ./boxxy.nix diff --git a/users/tao/cargo.toml b/users/tao/cargo.toml index 867b7d7..4097f76 100644 --- a/users/tao/cargo.toml +++ b/users/tao/cargo.toml @@ -4,7 +4,7 @@ rr = "run --release" [build] target = "x86_64-unknown-linux-gnu" # rustc-wrapper = "${pkgs.sccache}/bin/sccache" -rustc-wrapper = "path/to/sccache" +rustc-wrapper = "/path/to/sccache" rustflags = ["-Z", "threads=8"] [unstable] @@ -31,10 +31,10 @@ lto = "fat" # linker = "clang" # rustflag = ["-C", "target-cpu=native", "link-arg=ld-path=${pkgs.mold}/bin/mold"] -[target.x86-unknown-linux-gnu] +[target.x86_64-unknown-linux-gnu] # linker = "musl-gcc" linker = "clang" -rustflag = ["-C", "target-cpu=native", "link-arg=ld-path=${pkgs.mold}/bin/mold"] +rustflags = ["-Ctarget-cpu=native", "-Clink-arg=-fuse-ld=mold"] # jonhoo # https://benw.is/posts/how-i-improved-my-rust-compile-times-by-seventy-five-percent diff --git a/users/tao/helix.nix b/users/tao/helix.nix index 07beed8..567408c 100644 --- a/users/tao/helix.nix +++ b/users/tao/helix.nix @@ -51,6 +51,7 @@ }; }; languages = { + use-grammars.only = ["rust" "c" "cpp" "typst" "nix" "html"]; language = [ { name = "arduino"; diff --git a/users/tao/nushell/stuff.nu b/users/tao/nushell/stuff.nu index 55fe9ac..8e81bb1 100644 --- a/users/tao/nushell/stuff.nu +++ b/users/tao/nushell/stuff.nu @@ -20,16 +20,28 @@ def c [path: path = "~"] { } def l [ --all (-a) + --long (-l) path: path = "." ] { - if $all { + if $all and $long { + ls -la $path + } else if $all { ls -a $path + } else if $long { + ls -l $path } else { ls $path } | sort-by type name -i -n } +def rg [pattern?] { + if $pattern == null { + sk --ansi -i -c 'rg --color=always --line-number "{}"' + } else { + rg $pattern + } +} alias nd = nix develop def ns [package] { @@ -38,6 +50,7 @@ def ns [package] { def rebuild [subcommand] { sudo nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose + rm ~/.config/helix/runtime/grammars/* hx --grammar fetch; hx --grammar build rm -rf ~/.cache/jdtls/ }