diff --git a/extras/dev.nix b/extras/dev.nix index eef0930..1f2b9c5 100644 --- a/extras/dev.nix +++ b/extras/dev.nix @@ -1,5 +1,7 @@ {pkgs, ...}: { environment.systemPackages = with pkgs; [ + qemu + # quickemu # lychee # link checker # etcher # freecad diff --git a/users/tao.nix b/users/tao.nix index 6aaa7d7..c4f065f 100644 --- a/users/tao.nix +++ b/users/tao.nix @@ -49,7 +49,7 @@ snapper starship syncthingtray - taskwarrior + taskwarrior3 thunderbird typst typst-fmt diff --git a/users/tao/HOME.nix b/users/tao/HOME.nix index 3aecb1b..2d55b95 100644 --- a/users/tao/HOME.nix +++ b/users/tao/HOME.nix @@ -81,6 +81,32 @@ in { extraConfig = builtins.readFile ./nushell/stuff.nu; }; + ssh = { + enable = true; + addKeysToAgent = "yes"; + compression = true; + matchBlocks = { + "stargate" = { + hostname = "stargate.cs.usfca.edu"; + user = "tltien"; + forwardAgent = true; + identityFile = "/home/tao/.ssh/id_ed25519"; + }; + "beagle" = { + hostname = "beagle"; + user = "tltien"; + forwardAgent = true; + identityFile = "/home/tao/.ssh/id_ed25519"; + proxyCommand = "ssh stargate -W %h:%p"; + }; + "github" = { + hostname = "github.com"; + forwardAgent = true; + identityFile = "/home/tao/.ssh/id_ed25519"; + }; + }; + }; + starship = { enable = true; enableNushellIntegration = true; diff --git a/users/tao/helix.nix b/users/tao/helix.nix index 295b12f..f9262ff 100644 --- a/users/tao/helix.nix +++ b/users/tao/helix.nix @@ -52,7 +52,7 @@ }; }; languages = { - use-grammars.only = ["rust" "c" "cpp" "typst" "nix" "html" "toml" "markdown"]; + use-grammars.only = ["rust" "c" "cpp" "typst" "nix" "html" "toml" "markdown" "just"]; language = [ { name = "arduino"; diff --git a/users/tao/nushell/stuff.nu b/users/tao/nushell/stuff.nu index bd785fb..327f071 100644 --- a/users/tao/nushell/stuff.nu +++ b/users/tao/nushell/stuff.nu @@ -69,6 +69,12 @@ alias rb = rebuild boot alias rs = rebuild switch alias gc = nh clean all +def check-mullvad [] { + $env.LAST_EXIT_CODE = 69 + if $env.LAST_EXIT_CODE != 0 { + http get https://am.i.mullvad.net/json + } +} def tse [exit_node: string = ""] { if ($exit_node | is-empty) and (ps | find deluge | is-not-empty) { @@ -77,7 +83,7 @@ def tse [exit_node: string = ""] { } else { tailscale set --exit-node $exit_node } - http get https://am.i.mullvad.net/json + check-mullvad } def tsp [] { tailscale exit-node list @@ -116,8 +122,7 @@ def tsr [] { | select (random int 0..($in | length)) | tse $in.0 # tailscale status - sleep 5sec - http get https://am.i.mullvad.net/json + check-mullvad } alias ts = tailscale alias tss = tailscale status