This commit is contained in:
Tao Tien 2025-02-06 16:45:33 -08:00
parent 98e3cbbaaf
commit 946c6157bf
4 changed files with 24 additions and 16 deletions

View file

@ -1,5 +1,7 @@
[alias]
rr = "run --release"
rb = "run --bin"
d = "doc --no-deps --open"
[build]
target = "x86_64-unknown-linux-gnu"

View file

@ -70,25 +70,30 @@ def ns [package] {
def nr [package] {
nix search nixpkgs $package
}
def rebuild --wrapped [subcommand, ...rest] {
if ((open /etc/hostname --raw) == "NOlaptop\n" and not (try {$rest | first | str starts-with "--builders"} catch {true})) {
sudo nix store info --store ssh://nocomputer
}
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose ...$rest
toastify send rebuild done!
def rebuild --wrapped [subcommand, --builders: string, ...rest] {
if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders | is-empty) {
sudo nix store info --store ssh://nocomputer
}
if ($builders | is-empty) {
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose ...$rest
} else {
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose --builders $builders ...$rest
}
toastify send rebuild done!
}
# def post-rebuild [] {
# # rm -r ~/.config/helix/runtime/grammars/
# # hx --grammar fetch; hx --grammar build
# # rustup update
# }
def bump [] {
def post-rebuild [] {
rm -r ~/.config/helix/runtime/grammars/
hx --grammar fetch; hx --grammar build
rustup update
}
def bump --wrapped [...rest] {
cd /home/tao/projects/NOflake/
jj new -m "bump"
nix flake update
# rc2nix | save -f /home/tao/projects/NOflake/users/tao/plasma.nix;
# sudo nix store ping --store ssh://nocomputer
rebuild boot
rebuild boot ...$rest
jj new
}
alias rb = rebuild boot

View file

@ -9,7 +9,7 @@ local config = {
hide_tab_bar_if_only_one_tab = true,
-- enable_wayland = false,
enable_wayland = false,
-- webgpu_power_preference = 'LowPower',
-- front_end = 'WebGpu',
}