diff options
Diffstat (limited to 'users/seth/programs/git.nix')
| -rw-r--r-- | users/seth/programs/git.nix | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/users/seth/programs/git.nix b/users/seth/programs/git.nix index 674b3c8..4832bc1 100644 --- a/users/seth/programs/git.nix +++ b/users/seth/programs/git.nix @@ -1,13 +1,15 @@ -{ - config, - lib, - ... -}: let +{ config, lib, ... }: +let cfg = config.seth.programs.git; -in { +in +{ options.seth.programs.git = { - enable = lib.mkEnableOption "Git configuration settings" // {default = config.seth.enable;}; - gh.enable = lib.mkEnableOption "GitHub CLI support" // {default = cfg.enable;}; + enable = lib.mkEnableOption "Git configuration settings" // { + default = config.seth.enable; + }; + gh.enable = lib.mkEnableOption "GitHub CLI support" // { + default = cfg.enable; + }; }; config = lib.mkIf cfg.enable { @@ -24,7 +26,10 @@ in { gitCredentialHelper = { enable = true; - hosts = ["https://github.com" "https://github.example.com"]; + hosts = [ + "https://github.com" + "https://github.example.com" + ]; }; }; @@ -38,7 +43,9 @@ in { }; extraConfig = { - init = {defaultBranch = "main";}; + init = { + defaultBranch = "main"; + }; }; signing = { |
