summaryrefslogtreecommitdiff
path: root/users/seth/programs/gh.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/seth/programs/gh.nix')
-rw-r--r--users/seth/programs/gh.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/users/seth/programs/gh.nix b/users/seth/programs/gh.nix
new file mode 100644
index 0000000..8b33162
--- /dev/null
+++ b/users/seth/programs/gh.nix
@@ -0,0 +1,36 @@
+{
+ config,
+ lib,
+ ...
+}:
+let
+ cfg = config.seth.programs.gh;
+in
+{
+ options.seth.programs.gh = {
+ enable = lib.mkEnableOption "GitHub CLI" // {
+ default = config.seth.programs.git.enable;
+ defaultText = "config.seth.programs.git.enable";
+ };
+ };
+
+ config = lib.mkIf cfg.enable {
+ programs.gh = {
+ enable = true;
+
+ settings = {
+ git_protocol = "https";
+ editor = "nvim";
+ prompt = "enabled";
+ };
+
+ gitCredentialHelper = {
+ enable = true;
+ hosts = [
+ "https://github.com"
+ "https://github.example.com"
+ ];
+ };
+ };
+ };
+}