nix-config/modules/git/default.nix
2024-03-22 23:35:56 -07:00

21 lines
536 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;
userName = "notusknot";
userEmail = "notusknot@gmail.com";
extraConfig = {
init = { defaultBranch = "main"; };
core = {
excludesfile = "$NIXOS_CONFIG_DIR/scripts/gitignore";
};
};
};
};
}