From 48863d7e333815fee7b6af6608d9fe5fb3d1dfb0 Mon Sep 17 00:00:00 2001 From: Adam Simpson Date: Mon, 28 Mar 2022 16:34:12 -0400 Subject: [PATCH] feat: migrate to new sshackd server instance. Also add shell.nix + direnv support --- .envrc | 2 ++ cmd/ssh.go | 2 +- shell.nix | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..42fea5c --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +eval "$(lorri direnv)" +use nix diff --git a/cmd/ssh.go b/cmd/ssh.go index d17d3da..6455aa2 100644 --- a/cmd/ssh.go +++ b/cmd/ssh.go @@ -180,7 +180,7 @@ func getCert(url string) (cert Cert, error error) { func init() { rootCmd.AddCommand(sshCmd) - sshCmd.Flags().StringP("url", "u", "https://sshackd.herokuapp.com", "Set an alternate API URL") + sshCmd.Flags().StringP("url", "u", "https://sshackd.sparkbox.com", "Set an alternate API URL") sshCmd.Flags().BoolP("print", "p", false, "Print cert and private key instead of adding to ssh-agent") sshCmd.Flags().BoolP("write", "w", false, "Write cert (key-cert.pub) and key (key) to files instead of adding them to ssh-agent") } diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..76c1f57 --- /dev/null +++ b/shell.nix @@ -0,0 +1,4 @@ +{ pkgs ? import {} }: + pkgs.mkShell { + nativeBuildInputs = [ pkgs.buildPackages.go pkgs.buildPackages.gopls ]; +}