feat(nix): migrate gh and extensions

This commit is contained in:
Stefan Imhoff
2024-07-16 18:56:51 +02:00
parent 5755cafa17
commit 821e712bc4
8 changed files with 33 additions and 37 deletions

View File

@@ -5,14 +5,12 @@
- clean: ["~"]
- create:
- ~/.config/gh
- ~/.config/gh-dash
- ~/.config/tmux
- link:
~/.config/fish: fish
~/.config/gh-dash/config.yml: github/gh-dash/config.yml
~/.config/gh/config.yml: github/gh/config.yml
~/.config/nvim: nvim
~/.config/starship.toml: prompt/starship.toml
~/.config/tmux/tmux-nerd-font-window-name.yml: tmux/tmux-nerd-font-window-name.yml

View File

@@ -157,8 +157,6 @@ brew "fish"
brew "fzf"
# Graphics library to dynamically manipulate images
brew "gd"
# GitHub command-line tool
brew "gh"
# Distributed revision control system
brew "git"
# Enable transparent encryption/decryption of files in a git repo

View File

@@ -1 +0,0 @@
version: "1"

View File

@@ -1,18 +0,0 @@
# What protocol to use when performing git operations. Supported values: ssh, https
git_protocol: https
# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
editor:
# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
prompt: enabled
# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
pager:
# Aliases allow you to create nicknames for gh commands
aliases:
co: pr checkout
xds: 'pr list --label="team: xds-web"'
me: pr list --assignee @me
# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
http_unix_socket:
# What web browser gh should use when opening URLs. If blank, will refer to environment.
browser:
version: "1"

View File

@@ -13,6 +13,7 @@ in
./ctags
./curl
./editorconfig
./gh
./git
./gnupg
./hammerspoon

32
nix/home/gh/default.nix Normal file
View File

@@ -0,0 +1,32 @@
{ pkgs, ... }:
{
programs.gh = {
enable = true;
extensions = with pkgs; [
gh-copilot # Ask for assistance right in your terminal
gh-dash # Display a dashboard with pull requests and issues
gh-eco # Explore the ecosystem
gh-f # Ultimate FZF extension
gh-markdown-preview # Preview Markdown looking like on GitHub
gh-notify # Display GitHub notifications
gh-poi # Safely clean up your local branches
gh-s # Search github repositories interactively
];
settings = {
git_protocol = "ssh";
prompt = "enabled";
aliases = {
co = "pr checkout";
me = "pr list --assignee @me";
pv = "pr view";
xds = "pr list --label='team: design-system'";
};
};
};
home.packages = with pkgs; [
git
gh
];
}

View File

@@ -1,10 +0,0 @@
#!/bin/sh
gh extension install github/gh-copilot
gh extension install thatvegandev/gh-eco
gh extension install gennaro-tedesco/gh-s
gh extension install mislav/gh-branch
gh extension install seachicken/gh-poi
gh extension install keidarcy/gh-star
gh extension install dlvhdr/gh-dash
gh extension install kawarimidoll/gh-graph

View File

@@ -67,10 +67,6 @@ source ./ruby.sh
echo "Installing Go"
source ./golang.sh
# GitHub CLI Extensions
echo "Installing GitHub CLI Extensions"
source ./github.sh
# MacOS Default Settings
echo "Restoring default settings for MacOS"
source ./macos.sh