diff --git a/flake.nix b/flake.nix index a4f42f7..0bc5bd1 100644 --- a/flake.nix +++ b/flake.nix @@ -233,6 +233,7 @@ (import ./overlays/betterlockscreen.nix) (import ./overlays/age.nix inputs) (import ./overlays/proton-ge.nix inputs) + (import ./overlays/gh-collaborators.nix) ]; # System types to support. diff --git a/modules/common/shell/github.nix b/modules/common/shell/github.nix index a806ad3..9dc64ef 100644 --- a/modules/common/shell/github.nix +++ b/modules/common/shell/github.nix @@ -7,6 +7,7 @@ enable = true; gitCredentialHelper.enable = true; settings.git_protocol = "https"; + extensions = [ pkgs.gh-collaborators ]; }; programs.fish = @@ -14,7 +15,7 @@ shellAbbrs = { ghr = "gh repo view -w"; gha = - "gh run list | head -1 | awk '{ print $(NF-2) }' | xargs gh run view"; + "gh run list | head -1 | awk '{ print \\$\\(NF-2\\) }' | xargs gh run view"; grw = "gh run watch"; grf = "gh run view --log-failed"; grl = "gh run view --log"; diff --git a/overlays/gh-collaborators.nix b/overlays/gh-collaborators.nix new file mode 100644 index 0000000..09a4c3f --- /dev/null +++ b/overlays/gh-collaborators.nix @@ -0,0 +1,25 @@ +_final: prev: { + + gh-collaborators = prev.buildGo120Module rec { + pname = "gh-collaborators"; + version = "2.0.2"; + + src = prev.fetchFromGitHub { + owner = "katiem0"; + repo = "gh-collaborators"; + rev = version; + sha256 = "sha256-sz5LHkwZ28aA2vbMnFMzAlyGiJBDZm7jwDQYxgKBPLU="; + }; + + vendorHash = "sha256-rsRDOgJBa8T6+bC/APcmuRmg6ykbIp9pwRnJ9rrfHEs="; + + ldflags = [ + "-s" + "-w" + "-X github.com/katiem0/gh-collaborators/cmd.Version=${version}" + # "-X main.Version=${version}" + ]; + + }; + +}