This commit is contained in:
Tao Tien 2024-05-25 18:35:30 -07:00
parent d91d84d360
commit 652b0a4a0a
5 changed files with 20 additions and 5 deletions

View file

@ -8,6 +8,7 @@
# fontforge
# radicle-node
# hyperfine # benchmarking
git-cliff
b3sum
direnv
jujutsu

View file

@ -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

View file

@ -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

View file

@ -51,6 +51,7 @@
};
};
languages = {
use-grammars.only = ["rust" "c" "cpp" "typst" "nix" "html"];
language = [
{
name = "arduino";

View file

@ -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/
}