mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: expose shared home manager configuration via homeModules
This commit is contained in:
parent
5155bd69e8
commit
5b95c43559
47 changed files with 45 additions and 29 deletions
64
nix/homeModules/git/default.nix
Normal file
64
nix/homeModules/git/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
# git plugins
|
||||
programs.git = {
|
||||
lfs = {
|
||||
enable = true;
|
||||
skipSmudge = true;
|
||||
};
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
syntax-theme = "OneHalfLight";
|
||||
features = "side-by-side";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# git itself
|
||||
programs.git = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
init.defaultBranch = "mistress"; # haha gay haha
|
||||
push.autoSetupRemote = true;
|
||||
pull.ff = "only";
|
||||
rerere.enabled = true;
|
||||
safe.directory = "/etc/docker/compose";
|
||||
};
|
||||
ignores = [
|
||||
"*~"
|
||||
"*.swp"
|
||||
".DS_Store"
|
||||
".direnv/"
|
||||
"**/result"
|
||||
".pre-commit-config.yaml"
|
||||
".config/nvim/spell/"
|
||||
".local/bin/"
|
||||
];
|
||||
};
|
||||
|
||||
# identity
|
||||
programs.git = {
|
||||
userEmail = "leana.jiang+git@icloud.com";
|
||||
userName = "Léana 江";
|
||||
signing = {
|
||||
key = "0x4E887A4CA9714ADA";
|
||||
signByDefault = lib.mkDefault false;
|
||||
};
|
||||
};
|
||||
|
||||
programs.git.includes = [
|
||||
# university identity
|
||||
{
|
||||
condition = "gitdir:~/univ-repos/";
|
||||
contents = {
|
||||
init.defaultBranch = "main";
|
||||
user = {
|
||||
name = "Léana CHIANG";
|
||||
email = "leana.chiang@etudiant.univ-rennes1.fr";
|
||||
signingKey = "0x32035DB97E777EEB";
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue