summaryrefslogtreecommitdiff
path: root/users/seth/programs
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
parentcb59c201118b5216833f77be20dae5fb5c6786cd (diff)
seth/gh: split from git module
Diffstat (limited to 'users/seth/programs')
-rw-r--r--users/seth/programs/default.nix1
-rw-r--r--users/seth/programs/gh.nix36
-rw-r--r--users/seth/programs/git.nix51
3 files changed, 50 insertions, 38 deletions
diff --git a/users/seth/programs/default.nix b/users/seth/programs/default.nix
index 812d364..594f14c 100644
--- a/users/seth/programs/default.nix
+++ b/users/seth/programs/default.nix
@@ -13,6 +13,7 @@
./chromium.nix
./firefox
./fish.nix
+ ./gh.nix
./git.nix
./gpg.nix
./mangohud.nix
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"
+ ];
+ };
+ };
+ };
+}
diff --git a/users/seth/programs/git.nix b/users/seth/programs/git.nix
index f0e6f40..b80dc8e 100644
--- a/users/seth/programs/git.nix
+++ b/users/seth/programs/git.nix
@@ -15,52 +15,27 @@ in
default = config.seth.enable;
defaultText = lib.literalExpression "config.seth.enable";
};
-
- gh.enable = lib.mkEnableOption "GitHub CLI support" // {
- default = true;
- };
};
config = lib.mkIf cfg.enable {
- programs = {
- gh = lib.mkIf cfg.gh.enable {
- enable = true;
- settings = {
- git_protocol = "https";
- editor = "nvim";
- prompt = "enabled";
- # workaround for https://github.com/nix-community/home-manager/issues/474
- version = 1;
- };
-
- gitCredentialHelper = {
- enable = true;
- hosts = [
- "https://github.com"
- "https://github.example.com"
- ];
- };
- };
+ programs.git = {
+ enable = true;
- git = {
- enable = true;
+ riff.enable = true;
- riff.enable = true;
-
- extraConfig = {
- init = {
- defaultBranch = "main";
- };
- };
-
- signing = {
- key = "D31BD0D494BBEE86";
- signByDefault = true;
+ extraConfig = {
+ init = {
+ defaultBranch = "main";
};
+ };
- userEmail = "[email protected]";
- userName = "seth";
+ signing = {
+ key = "D31BD0D494BBEE86";
+ signByDefault = true;
};
+
+ userEmail = "[email protected]";
+ userName = "seth";
};
};
}