Files
nix-config/homeConfigs/modules/git.nix
tomoron 6d045d1d4d
All checks were successful
Build iso when a new version is pushed / test (push) Successful in 1m36s
uacess on usb df11 devices and setup nix-ld
2026-01-19 11:51:50 +01:00

32 lines
786 B
Nix

{ 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;
lfs.enable = true;
settings = {
user.email = "tomoron@student.42angouleme.fr";
user.name = "tomoron";
init.defaultBranch="master";
pull.rebase = true;
push.autoSetupRemote = true;
rerere.enabled = true;
help.autocorrect = 1;
user.signingkey = "251B4BD73683A8DF13D760A868BFAFE31DF313AD";
commit.gpgsign = true;
alias = {
fuck = "!f() { git reset --hard \"@{upstream}\" && git restore . && git clean -f .; };f";
back = "reset HEAD~";
};
};
};
};
}