{ pkgs, config, lib, ... }: with lib; let cfg = config.erwin.git; in { options.erwin.git = { enable = mkOption { description = "Enable git"; type = types.bool; default = false; }; userName = mkOption { description = "Name for git"; type = types.str; default = "Erwin Boskma"; }; userEmail = mkOption { description = "Email for git"; type = types.str; default = "erwin@datarift.nl"; }; }; config = mkIf (cfg.enable) { programs.git = { enable = true; userName = cfg.userName; userEmail = cfg.userEmail; extraConfig = { credential.helper = "${pkgs.git.override { withLibsecret = true; }}/bin/git-credential-libsecret"; }; }; home.packages = with pkgs; [ ]; }; }