1
1
Fork 0
nixos/options/custom/programs/git.nix
Myned ea1512b9fa
git: auto prune on fetch
Signed-off-by: Myned <dev@bjork.tech>
2024-09-28 13:44:19 -05:00

39 lines
884 B
Nix

{
config,
lib,
...
}:
with lib; let
cfg = config.custom.programs.git;
in {
options.custom.programs.git.enable = mkOption {default = false;};
config.home-manager.users.${config.custom.username} = mkIf cfg.enable {
# https://wiki.archlinux.org/title/Git
# https://git-scm.com
programs.git = {
enable = true;
userName = "Myned";
userEmail = "dev@bjork.tech";
# BUG: GitHub Desktop tries to enable if this is not in gitconfig
lfs.enable = true; # Enable Large File Storage
signing = {
signByDefault = true;
key = "C7224454F7881A34";
};
extraConfig = {
fetch.prune = true;
init.defaultBranch = "master";
push.autoSetupRemote = true;
pull.ff = "only";
url."git@github.com:".insteadOf = [
"gh:"
"github:"
];
};
};
};
}