alias
This commit is contained in:
parent
4e73f88e25
commit
ab791e7b77
4 changed files with 12 additions and 10 deletions
|
|
@ -60,7 +60,7 @@
|
|||
snapper
|
||||
starship
|
||||
syncplay
|
||||
syncthingtray
|
||||
# syncthingtray
|
||||
taskwarrior3
|
||||
tinymist
|
||||
toastify
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue