summaryrefslogtreecommitdiff
path: root/users/seth/programs/gh.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2024-11-20 20:04:39 -0500
committerseth <[email protected]>2024-11-21 03:07:31 -0500
commite998a21d1dcef95d97328273c1420f1196c89e09 (patch)
treeeca3a11b39bc5d06e0cd98540748c85d0b39a270 /users/seth/programs/gh.nix
parentcb59c201118b5216833f77be20dae5fb5c6786cd (diff)
seth/gh: split from git module
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"
+ ];
+ };
+ };
+ };
+}