1
0
Fork 0
forked from irl/nix-configs

feat: refactor home-manager configs

This commit is contained in:
Iain Learmonth 2025-07-06 21:49:22 +01:00
parent 442c9051ba
commit fca82b60ce
13 changed files with 355 additions and 150 deletions

View file

@ -0,0 +1,41 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.feature.git;
in
{
options.feature.git.enable = lib.mkEnableOption "Set up git";
config = {
programs.git = {
delta.enable = true;
enable = true;
extraConfig = {
diff = {
algorithm = "histogram";
};
init = {
defaultBranch = "main";
};
rebase = {
autosquash = true;
autostash = true;
};
url = {
"git@github.com:".pushInsteadOf = "https://github.com/";
"git@gitlab.com:".pushInsteadOf = "https://gitlab.com/";
"git@guardianproject.dev:".pushInsteadOf = "https://guardianproject.dev/";
};
user = {
name = "irl";
email = "iain@learmonth.me";
};
};
};
};
}