Refactor modules into nixos and home-manager
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 3m14s
This commit is contained in:
39
modules/home-manager/programs/git/default.nix
Normal file
39
modules/home-manager/programs/git/default.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ 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;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user