mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
77 lines
1.5 KiB
Nix
77 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
# git plugins
|
|
programs.git = {
|
|
lfs.enable = true;
|
|
};
|
|
|
|
# Wait for PR
|
|
# https://github.com/nix-community/home-manager/pull/6978
|
|
home.packages = [
|
|
pkgs.patdiff
|
|
];
|
|
programs.git.iniContent = {
|
|
diff.external = "${lib.getExe' pkgs.patdiff "patdiff-git-wrapper"}";
|
|
};
|
|
|
|
# git itself
|
|
programs.git = {
|
|
extraConfig = {
|
|
init.defaultBranch = "mistress"; # haha gay haha
|
|
push.autoSetupRemote = true;
|
|
pull.ff = "only";
|
|
rerere.enabled = true;
|
|
};
|
|
ignores = [
|
|
# sanity
|
|
".env"
|
|
|
|
# vim
|
|
"*~"
|
|
"*.swp"
|
|
|
|
# darwin
|
|
".DS_Store"
|
|
|
|
# nix
|
|
".direnv/"
|
|
"**/result"
|
|
|
|
# pre-commit
|
|
".pre-commit-config.yaml"
|
|
|
|
# dotfiles
|
|
".config/nvim/spell/"
|
|
];
|
|
};
|
|
|
|
# identity
|
|
programs.git = {
|
|
userEmail = "leana.jiang+git@icloud.com";
|
|
userName = "Léana 江";
|
|
signing = {
|
|
key = "0x4E887A4CA9714ADA";
|
|
signByDefault = lib.mkDefault false;
|
|
};
|
|
};
|
|
|
|
programs.git.includes = let
|
|
universityIdentity = url: {
|
|
condition = "hasconfig:remote.*.url:git@${url}:*/**";
|
|
contents = {
|
|
init.defaultBranch = "main";
|
|
user = {
|
|
name = "Léana CHIANG";
|
|
email = "leana.chiang@etudiant.univ-rennes1.fr";
|
|
signingKey = "0x32035DB97E777EEB";
|
|
};
|
|
};
|
|
};
|
|
in [
|
|
(universityIdentity "gitlab.istic.univ-rennes1.fr")
|
|
(universityIdentity "gitlab2.istic.univ-rennes1.fr")
|
|
];
|
|
}
|