forked from irl/nix-configs
feat: refactor home-manager configs
This commit is contained in:
parent
442c9051ba
commit
fca82b60ce
13 changed files with 355 additions and 150 deletions
41
modules/home-manager/git/git.nix
Normal file
41
modules/home-manager/git/git.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue