refactor: centralize host and user metadata
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
{ ... }:
|
||||
{
|
||||
flake.modules.homeManager.git =
|
||||
{ ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = config.meta.user;
|
||||
primaryEmail = builtins.head (lib.filter (email: email.primary) (builtins.attrValues user.emails));
|
||||
in
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
@@ -12,6 +20,10 @@
|
||||
];
|
||||
settings = {
|
||||
init.defaultBranch = "main";
|
||||
user = {
|
||||
name = user.realName;
|
||||
email = primaryEmail.address;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user