2024-05-16 01:56:17 -07:00
|
|
|
task
|
|
|
|
|
|
|
|
|
|
alias b = btm
|
|
|
|
|
alias cringe = sudo bootctl set-oneshot auto-windows
|
|
|
|
|
alias fetch = fastfetch
|
|
|
|
|
alias ff = firefox
|
|
|
|
|
alias pu = pueue
|
|
|
|
|
alias t = task
|
|
|
|
|
alias zl = zellij
|
|
|
|
|
|
2024-05-19 16:14:11 -07:00
|
|
|
alias jd = jj diff
|
2024-05-25 17:18:24 -07:00
|
|
|
alias jc = jj desc
|
2024-05-19 16:14:11 -07:00
|
|
|
alias js = jj status
|
|
|
|
|
alias jp = jj git push
|
|
|
|
|
alias jm = jj branch set main
|
2024-04-20 18:47:52 -07:00
|
|
|
|
2024-05-16 01:56:17 -07:00
|
|
|
def c [path: path = "~"] {
|
|
|
|
|
cd $path
|
|
|
|
|
l
|
|
|
|
|
}
|
2024-04-28 10:56:51 -07:00
|
|
|
def l [
|
2024-05-25 17:18:24 -07:00
|
|
|
--all (-a)
|
2024-05-16 01:56:17 -07:00
|
|
|
path: path = "."
|
2024-04-28 10:56:51 -07:00
|
|
|
] {
|
2024-05-25 17:18:24 -07:00
|
|
|
if $all {
|
|
|
|
|
ls -a $path
|
|
|
|
|
} else {
|
|
|
|
|
ls $path
|
|
|
|
|
}
|
2024-05-16 03:51:55 -07:00
|
|
|
| sort-by type name -i -n
|
2024-04-28 10:56:51 -07:00
|
|
|
}
|
|
|
|
|
|
2024-05-06 12:58:30 -07:00
|
|
|
|
2024-05-25 17:18:24 -07:00
|
|
|
alias nd = nix develop
|
2024-05-16 01:56:17 -07:00
|
|
|
def ns [package] {
|
|
|
|
|
nix shell $"nixpkgs#($package)"
|
|
|
|
|
}
|
2024-05-25 17:18:24 -07:00
|
|
|
|
2024-05-09 23:37:38 -07:00
|
|
|
def rebuild [subcommand] {
|
|
|
|
|
sudo nice -n19 nixos-rebuild $subcommand --flake /home/tao/projects/NOflake/ --impure --verbose
|
|
|
|
|
hx --grammar fetch; hx --grammar build
|
|
|
|
|
rm -rf ~/.cache/jdtls/
|
|
|
|
|
}
|
2024-05-07 13:10:41 -07:00
|
|
|
def bump [] {
|
|
|
|
|
cd /home/tao/projects/NOflake/
|
|
|
|
|
jj new -m "bump"
|
|
|
|
|
nix flake update
|
|
|
|
|
# rc2nix | save -f /home/tao/projects/NOflake/users/tao/plasma.nix;
|
2024-05-07 13:37:09 -07:00
|
|
|
# sudo nix store ping --store ssh://nocomputer
|
2024-05-09 23:37:38 -07:00
|
|
|
rebuild boot
|
2024-05-07 13:10:41 -07:00
|
|
|
jj new
|
|
|
|
|
}
|
2024-05-09 23:37:38 -07:00
|
|
|
alias rb = rebuild boot
|
|
|
|
|
alias rs = rebuild switch
|
2024-05-16 01:56:17 -07:00
|
|
|
alias gc = nh clean all
|
2024-04-28 10:56:51 -07:00
|
|
|
|
|
|
|
|
|
2024-05-16 01:56:17 -07:00
|
|
|
def tse [exit_node: string = ""] {
|
2024-05-21 23:06:14 -07:00
|
|
|
tailscale set --exit-node $exit_node
|
|
|
|
|
http get https://am.i.mullvad.net/json
|
2024-05-16 01:56:17 -07:00
|
|
|
}
|
|
|
|
|
def tsp [] {
|
|
|
|
|
tailscale exit-node list
|
|
|
|
|
| split row "\n"
|
|
|
|
|
| each {str trim}
|
|
|
|
|
| filter {is-not-empty}
|
|
|
|
|
| skip 1
|
|
|
|
|
| last 19
|
|
|
|
|
| first 17
|
|
|
|
|
| split column -r '\s{2,}'
|
|
|
|
|
| reject column5 column3
|
|
|
|
|
| rename ip addr city
|
|
|
|
|
| par-each {
|
|
|
|
|
insert ping {
|
|
|
|
|
|row| $row.addr
|
|
|
|
|
| str replace "mullvad.ts.net" "relays.mullvad.net"
|
|
|
|
|
| ping -c5 -q $in
|
|
|
|
|
| split row "\n"
|
|
|
|
|
| last
|
|
|
|
|
| split column "/"
|
|
|
|
|
| get column6?
|
|
|
|
|
| get 0
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-05-21 23:06:14 -07:00
|
|
|
| sort-by ping -n -r
|
2024-05-16 01:56:17 -07:00
|
|
|
}
|
|
|
|
|
def tsr [] {
|
|
|
|
|
tailscale status --json
|
|
|
|
|
| from json
|
|
|
|
|
| get Peer
|
|
|
|
|
| transpose nodekey node
|
|
|
|
|
| get node
|
|
|
|
|
| filter {$in.Location?.Country == USA}
|
|
|
|
|
| get TailscaleIPs
|
|
|
|
|
| each {get 0}
|
|
|
|
|
| select (random int 0..($in | length))
|
|
|
|
|
| tse $in.0
|
2024-05-19 16:14:11 -07:00
|
|
|
# tailscale status
|
|
|
|
|
http get https://am.i.mullvad.net/json
|
2024-05-16 01:56:17 -07:00
|
|
|
}
|
2024-03-15 12:47:44 -07:00
|
|
|
alias ts = tailscale
|
|
|
|
|
alias tss = tailscale status
|
2024-05-16 03:51:55 -07:00
|
|
|
alias tsu = tailscale up
|
|
|
|
|
alias tsd = tailscale down
|
2024-03-15 12:47:44 -07:00
|
|
|
alias tsx = tailscale exit-node list
|
2024-04-25 15:48:29 -07:00
|
|
|
|
2024-05-16 01:56:17 -07:00
|
|
|
|
|
|
|
|
source ~/.cache/starship/init.nu
|
|
|
|
|
source ~/.zoxide.nu
|