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 snapper
starship starship
syncplay syncplay
syncthingtray # syncthingtray
taskwarrior3 taskwarrior3
tinymist tinymist
toastify toastify

View file

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

View file

@ -9,7 +9,7 @@ def ns [...packages: string] {
# nix search nixpkgs $package # nix search nixpkgs $package
# } # }
def rebuild [subcommand, --builders: string] { def --wrapped rebuild [subcommand, ...rest] {
if not ( 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} 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 return false
} }
mut builders = $builders; mut builders = ""
if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders != "") { if (open /etc/hostname --raw) == "NOlaptop\n" and ($builders != "") {
if (ping -c1 -W1 nocomputer | complete | $in.exit_code == 0) { if (ping -c1 -W1 nocomputer | complete | $in.exit_code == 0) {
sudo nix store info --store ssh://nocomputer sudo nix store info --store ssh://nocomputer
@ -25,11 +25,9 @@ def rebuild [subcommand, --builders: string] {
$builders = "" $builders = ""
} }
} }
if ($builders == "") {
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake . --accept-flake-config --impure --verbose --builders "" o+e>| nom sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake . --accept-flake-config --impure --verbose ...$rest o+e>| nom
} else {
sudo systemd-inhibit nice -n19 nixos-rebuild $subcommand --flake . --accept-flake-config --impure --verbose o+e>| nom
}
if $env.LAST_EXIT_CODE == 0 { if $env.LAST_EXIT_CODE == 0 {
toastify send "rebuild" "done!" toastify send "rebuild" "done!"
return true return true

View file

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