diff options
| author | seth <[email protected]> | 2023-08-17 13:46:41 -0400 |
|---|---|---|
| committer | seth <[email protected]> | 2023-08-17 13:55:47 -0400 |
| commit | 6ca79241fe6a45ca4468e4c54c778df116c0b14f (patch) | |
| tree | ca6bbd7eaec86125c0e59a2553922ea4ef4a2b9b /users/seth/programs/git.nix | |
| parent | 76127171e4ed7abcb2a14039f358e117aac20181 (diff) | |
users/seth: make everything a module
Diffstat (limited to 'users/seth/programs/git.nix')
| -rw-r--r-- | users/seth/programs/git.nix | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/users/seth/programs/git.nix b/users/seth/programs/git.nix index f496f90..290a1e8 100644 --- a/users/seth/programs/git.nix +++ b/users/seth/programs/git.nix @@ -1,17 +1,39 @@ -_: { - programs.git = { - enable = true; +{ + config, + lib, + ... +}: let + cfg = config.getchoo.programs.git; + inherit (lib) mkEnableOption mkIf; +in { + options.getchoo.programs.git.enable = mkEnableOption "git" // {default = true;}; - extraConfig = { - init = {defaultBranch = "main";}; - }; + config = mkIf cfg.enable { + programs = { + gh = { + enable = true; + settings = { + git_protocol = "ssh"; + editor = "nvim"; + prompt = "enabled"; + }; + }; - signing = { - key = "D31BD0D494BBEE86"; - signByDefault = true; - }; + git = { + enable = true; + + extraConfig = { + init = {defaultBranch = "main";}; + }; - userEmail = "[email protected]"; - userName = "seth"; + signing = { + key = "D31BD0D494BBEE86"; + signByDefault = true; + }; + + userEmail = "[email protected]"; + userName = "seth"; + }; + }; }; } |
