about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--home/zsh/default.nix2
-rw-r--r--home/zsh/gerrit.zsh5
2 files changed, 6 insertions, 1 deletions
diff --git a/home/zsh/default.nix b/home/zsh/default.nix
index 0ee9e43..fad7b2e 100644
--- a/home/zsh/default.nix
+++ b/home/zsh/default.nix
@@ -34,7 +34,6 @@ in {
       shellAliases = {
         ll = "ls -l --color=auto";
         lt = "ls -ltrh --color=auto";
-        drone = "DRONE_TOKEN=$(pass api/drone.fcuny.xyz) drone";
       };
 
       defaultKeymap = "emacs";
@@ -47,6 +46,7 @@ in {
 
       initExtra = lib.concatMapStrings builtins.readFile [
         ./completion-style.zsh
+        ./gerrit.zsh
         ./options.zsh
         ./prompt.zsh
         ./tmux.zsh
diff --git a/home/zsh/gerrit.zsh b/home/zsh/gerrit.zsh
new file mode 100644
index 0000000..9766b2f
--- /dev/null
+++ b/home/zsh/gerrit.zsh
@@ -0,0 +1,5 @@
+function rgerrit() {
+  # gerrit runs on tahoe, and we ssh to it through its tailscale
+  # network interface.
+  ssh $(tailscale status --json | jq -r '.Peer | map(select(.HostName == "tahoe"))[0].TailscaleIPs[0]') -p 29418 gerrit $@
+}