This commit is contained in:
Tao Tien 2025-11-25 17:22:05 -08:00
parent 4e73f88e25
commit ab791e7b77
4 changed files with 12 additions and 10 deletions

View file

@ -60,7 +60,7 @@
snapper
starship
syncplay
syncthingtray
# syncthingtray
taskwarrior3
tinymist
toastify

View file

@ -92,6 +92,9 @@ in {
jujutsu = {
enable = true;
settings = {
git = {
push-new-bookmarks = true;
};
user = {
name = "Tao Tien";
email = "29749622+taotien@users.noreply.github.com";

View file

@ -9,7 +9,7 @@ def ns [...packages: string] {
# nix search nixpkgs $package
# }
def rebuild [subcommand, --builders: string] {
def --wrapped rebuild [subcommand, ...rest] {
if not (
df -h | detect columns --guess | where "Mounted on" == "/" or "Mounted on" == "/boot" | get Use% | each {parse "{usage}%" | get usage | into int} | flatten | all {$in < 99}
) {
@ -17,7 +17,7 @@ def rebuild [subcommand, --builders: string] {
return false
}
mut builders = $builders;
mut builders = ""
if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders != "") {
if (ping -c1 -W1 nocomputer | complete | $in.exit_code == 0) {
sudo nix store info --store ssh://nocomputer
@ -25,11 +25,9 @@ def rebuild [subcommand, --builders: string] {
$builders = ""
}
}
if ($builders == "") {
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake . --accept-flake-config --impure --verbose --builders "" o+e>| nom
} else {
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake . --accept-flake-config --impure --verbose o+e>| nom
}
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake . --accept-flake-config --impure --verbose ...$rest o+e>| nom
if $env.LAST_EXIT_CODE == 0 {
toastify send "rebuild" "done!"
return true

View file

@ -57,8 +57,9 @@ def "fans" [duty?: int] {
}
}
alias "fans max" = fans 100
alias "fans quiet" = fans 42
alias louder = fans 100
alias loud = fans
alias quiet = fans 42
def asciicam [] {
$env.DISPLAY = null