{ config, lib, pkgs, ... }:

let 
  cfg = config.samfelag.modules.dev.git;
in {

  options.samfelag.modules.dev.git = {
    enable = lib.mkEnableOption "git config";
  };

  config = lib.mkIf cfg.enable {
    programs.git = {
      enable = true;

      userName = "marc";
      userEmail = "marc@sastre.cat";

      extraConfig = {
        init.defaultBranch = "main";
      };
    };
  };

}
