Jordan Holt 328a50c365
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
Refactor modules into nixos and home-manager
2025-01-19 01:22:43 +00:00

40 lines
866 B
Nix

{ config, lib, pkgs, ... }:
let cfg = config.modules.programs.git;
in {
options.modules.programs.git = {
enable = lib.mkOption {
default = false;
example = true;
};
};
config = lib.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;
};
};
home.configFile = {
"git/ignore".source = ./ignore;
};
};
}