Initial commit
This commit is contained in:
32
modules/features/git.nix
Normal file
32
modules/features/git.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ den, lib, ... }:
|
||||
let
|
||||
getPrimaryEmail =
|
||||
user:
|
||||
(lib.findFirst (email: email.primary) (throw "Missing primary email for ${user.userName}") (
|
||||
builtins.attrValues user.emails
|
||||
)).address;
|
||||
in
|
||||
{
|
||||
lux.git = den.lib.parametric {
|
||||
includes = [
|
||||
(
|
||||
{ user, ... }:
|
||||
{
|
||||
homeManager.programs.git = {
|
||||
enable = true;
|
||||
signing.format = "ssh";
|
||||
ignores = [
|
||||
".claude/"
|
||||
".codex/"
|
||||
];
|
||||
settings = {
|
||||
user.name = user.realName;
|
||||
user.email = getPrimaryEmail user;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user