1
0
Fork 0

fix(git): update from extraConfig to settings

This commit is contained in:
Philipp 2025-12-04 18:04:52 +01:00
parent d6f5f140d3
commit d187b96054
Signed by: Philipp
GPG key ID: B27C3DE2FD94AFC3

View file

@ -13,24 +13,28 @@ let
user = config.${namespace}.user; user = config.${namespace}.user;
in in
{ {
options.${namespace}.tools.git = { options.${namespace} = {
enable = mkEnableOption "Git"; tools.git = {
userName = mkOpt types.str "Philipp" "The name to configure git with."; enable = mkEnableOption "Git";
userEmail = mkOpt types.str "philipp@boehm.sh" "The email to configure git with."; signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with.";
signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with."; signByDefault = mkOpt types.bool true "Whether to sign commits by default.";
signByDefault = mkOpt types.bool true "Whether to sign commits by default."; };
user = {
name = mkOpt types.str "Philipp" "The name to configure git with.";
email = mkOpt types.str "philipp@boehm.sh" "The email to configure git with.";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.git = { programs.git = {
enable = true; enable = true;
inherit (cfg) userName userEmail;
lfs = enabled; lfs = enabled;
signing = { signing = {
key = cfg.signingKey; key = cfg.signingKey;
inherit (cfg) signByDefault; inherit (cfg) signByDefault;
}; };
extraConfig = { settings = {
inherit user;
init = { init = {
defaultBranch = "main"; defaultBranch = "main";
}; };