nixos/modules/git/default.nix
2023-06-05 15:14:24 -04:00

21 lines
362 B
Nix

{ pkgs, lib, config, ... }:
with lib;
let cfg = config.modules.git;
in
{
options.modules.git = { enable = mkEnableOption "git"; };
config = mkIf cfg.enable {
programs.git = {
enable = true;
extraConfig = {
init = { defaultBranch = "main"; };
};
};
home.file = {
".gitconfig".source = ./gitconfig;
};
};
}