nix/modules/stuff/git.nix
2024-11-13 17:05:36 +01:00

28 lines
719 B
Nix

{ lib, pkgs, config, ...}: let
inherit (lib) mkIf mkEnableOption mkOption;
cfg = config.chuj.stuff.git;
user = config.chuj.system.user;
in {
options.chuj.stuff.git = {
enable = mkEnableOption "git";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.git pkgs.codeberg-cli ];
home-manager.users.${user}.programs.git = {
enable = true;
# should this be here??????
userName = "krizej";
userEmail = "krizej@protonmail.com";
extraConfig.init.defaultBranch = "master";
ignores = [
".direnv/"
".idea/"
"build/"
".venv/"
".cache/"
"compile_commands.json"
"**/__pycache__/"
];
};
};
}