Files
nix/home/modules/git/default.nix
T
2026-09-27 20:59:21 +02:00

32 lines
589 B
Nix

{
config,
lib,
dotsPath,
...
}:
{
imports = [
./gitea.nix
./github.nix
./gitlab.nix
];
options.git.enable = lib.mkEnableOption "git";
config = lib.mkIf config.git.enable {
assertions = [
{
assertion = config.nvim.enable;
message = "git module requires 'nvim' module (`nvimdiff`)";
}
];
programs.git.enable = true;
home.file = {
".gitconfig".source = dotsPath + "/.gitconfig";
".gitconfig.work".source = dotsPath + "/.gitconfig.work";
".gitignore".source = dotsPath + "/.gitignore";
};
};
}