21 lines
536 B
Nix
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";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|