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 # fontforge
# radicle-node # radicle-node
# hyperfine # benchmarking # hyperfine # benchmarking
git-cliff
b3sum b3sum
direnv direnv
jujutsu jujutsu

View file

@ -5,7 +5,7 @@
... ...
}: let }: let
cargoFile = builtins.readFile ./cargo.toml; 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 { in {
imports = [ imports = [
./boxxy.nix ./boxxy.nix

View file

@ -4,7 +4,7 @@ rr = "run --release"
[build] [build]
target = "x86_64-unknown-linux-gnu" target = "x86_64-unknown-linux-gnu"
# rustc-wrapper = "${pkgs.sccache}/bin/sccache" # rustc-wrapper = "${pkgs.sccache}/bin/sccache"
rustc-wrapper = "path/to/sccache" rustc-wrapper = "/path/to/sccache"
rustflags = ["-Z", "threads=8"] rustflags = ["-Z", "threads=8"]
[unstable] [unstable]
@ -31,10 +31,10 @@ lto = "fat"
# linker = "clang" # linker = "clang"
# rustflag = ["-C", "target-cpu=native", "link-arg=ld-path=${pkgs.mold}/bin/mold"] # 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 = "musl-gcc"
linker = "clang" 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 # jonhoo
# https://benw.is/posts/how-i-improved-my-rust-compile-times-by-seventy-five-percent # https://benw.is/posts/how-i-improved-my-rust-compile-times-by-seventy-five-percent

View file

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

View file

@ -20,16 +20,28 @@ def c [path: path = "~"] {
} }
def l [ def l [
--all (-a) --all (-a)
--long (-l)
path: path = "." path: path = "."
] { ] {
if $all { if $all and $long {
ls -la $path
} else if $all {
ls -a $path ls -a $path
} else if $long {
ls -l $path
} else { } else {
ls $path ls $path
} }
| sort-by type name -i -n | 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 alias nd = nix develop
def ns [package] { def ns [package] {
@ -38,6 +50,7 @@ def ns [package] {
def rebuild [subcommand] { def rebuild [subcommand] {
sudo nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose sudo nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose
rm ~/.config/helix/runtime/grammars/*
hx --grammar fetch; hx --grammar build hx --grammar fetch; hx --grammar build
rm -rf ~/.cache/jdtls/ rm -rf ~/.cache/jdtls/
} }