34 lines
758 B
Nix
34 lines
758 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
with lib.my;
|
|
let cfg = config.modules.shell.git;
|
|
in {
|
|
options.modules.shell.git = {
|
|
enable = mkBoolOpt false;
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
home.programs.git = {
|
|
enable = true;
|
|
aliases = {
|
|
amend = "commit --amend";
|
|
lg = "log --color --graph --abbrev-commit --";
|
|
ls = "ls-files";
|
|
unadd = "reset HEAD";
|
|
undo-commit = "reset --soft \"HEAD^\"";
|
|
};
|
|
userEmail = "jordan@vimium.com";
|
|
userName = "Jordan Holt";
|
|
signing = {
|
|
key = "B8CFFF61F1CCF520";
|
|
signByDefault = true;
|
|
};
|
|
extraConfig = {
|
|
rebase.autosquash = true;
|
|
push.default = "current";
|
|
pull.rebase = true;
|
|
};
|
|
};
|
|
};
|
|
} |