yumeami/modules/home/cli/dev/git/default.nix
C4 Patino a3b69092fa
All checks were successful
ci / treefmt (push) Successful in 1m17s
chore: add .devenv/ build directory to .gitignore
2026-06-17 09:09:12 -05:00

87 lines
1.9 KiB
Nix
Executable file

{
config,
lib,
namespace,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption;
inherit (lib.${namespace}) getAttrByNamespace mkOptionsWithNamespace enabled;
base = "${namespace}.cli.dev.git";
cfg = getAttrByNamespace config base;
in {
options = mkOptionsWithNamespace base {
enable = mkEnableOption "git";
};
config = mkIf cfg.enable {
programs = {
git = {
enable = true;
lfs = enabled;
settings = {
commit.gpgsign = true;
core = {
pager = "delta";
editor = "nvim";
fileMode = false;
};
delta = {
dark = true;
hyperlinks = true;
line-numbers = true;
navigate = true;
side-by-side = true;
};
diff.colorMoved = "zebra";
fetch.prune = true;
gpg.format = "ssh";
init.defaultBranch = "main";
interactive.diffFilter = "delta --color-only";
maintenance.auto = true;
merge.conflictStyle = "zdiff3";
pull.rebase = true;
push.autoSetupRemote = true;
user = {
name = "C4 Patino";
email = "c4patino@gmail.com";
signingkey = "~/.ssh/id_ed25519.pub";
};
};
includes = [
{
condition = "gitdir:~/Programming/moo/";
contents = {
user = {
name = "Ceferino Patino";
email = "ceferino.patino@mutualofomaha.com";
signingkey = "~/.ssh/id_ed25519-mutualofomaha.pub";
};
};
}
];
ignores = [
".devenv/"
".direnv/"
".git/"
".pnpm-store/"
".venv/"
".env"
".env.local"
".envrc"
"AGENTS.md"
];
};
gh.enable = true;
};
home.packages = with pkgs; [
delta
];
};
}