nixos/home-manager/modules/git/default.nix
2025-04-17 13:36:46 -04:00

33 lines
628 B
Nix

{
config,
lib,
...
}: let
cfg = config.lily.git;
in {
options.lily.git = {
enable = lib.mkEnableOption "activate git";
};
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
lfs.enable = true;
extraConfig = {
user = {
name = "lily";
email = "lesson085@gmail.com";
signingKey = "Lily Vex";
};
commit.gpgsign = true;
init.defaultBranch = "main";
merge = {
ff = "no";
no-commit = "yes";
};
pull.ff = "only";
push = {autoSetupRemote = true;};
};
};
};
}