continue refactor, home modules are actual modules and remove some useless files
This commit is contained in:
27
homeConfigs/modules/git.nix
Normal file
27
homeConfigs/modules/git.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.mods.git.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "git configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userEmail = "tomoron@student.42angouleme.fr";
|
||||
userName = "tomoron";
|
||||
extraConfig = {
|
||||
init.defaultBranch="master";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
rerere.enabled = true;
|
||||
};
|
||||
aliases = {
|
||||
fuck = "!f() { git reset --hard \"@{upstream}\" && git restore . && git clean -f .; };f";
|
||||
back = "reset HEAD~";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user