38 lines
627 B
Nix
38 lines
627 B
Nix
{
|
|
user,
|
|
userName,
|
|
}: {
|
|
lib,
|
|
pkgs,
|
|
config,
|
|
...
|
|
}:
|
|
with lib; let
|
|
cfg = config.roles.git;
|
|
in {
|
|
options.roles = {
|
|
git = {
|
|
enable = mkEnableOption "email settings";
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home-manager.users.${user}.imports = [
|
|
{
|
|
programs.git = {
|
|
enable = true;
|
|
aliases = {
|
|
graph = "log --oneline --all --graph";
|
|
amend = "commit --amend --no-edit";
|
|
};
|
|
delta = {
|
|
enable = true;
|
|
};
|
|
extraConfig = {
|
|
pull.rebase = true;
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
}
|