{ 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"; }; }; }; }; }