Files
Olympus/modules/users/nathan/home-manager/features/git.nix
2026-04-22 13:27:21 -05:00

46 lines
1.1 KiB
Nix

{ ... }: {
flake.homeModules.nathan-git = { config, lib, ... }: {
config = {
sops = {
secrets = {
"git/username" = {};
"git/email" = {};
};
templates.gitconfig.content = ''
[user]
name = "${config.sops.placeholder."git/username"}"
email = "${config.sops.placeholder."git/email"}"
'';
};
programs.git = {
enable = true;
includes = [
{ path = "${config.sops.templates.gitconfig.path}"; }
];
settings = {
init = {
defaultBranch = "master";
};
safe.directory = "/etc/nixos";
url = {
"ssh://gitea@gitea.esotericbytes.com/" = {
insteadOf = [
"server:"
];
};
};
};
};
};
};
}