From d187b96054183495a7e83e852bc93b7977ca1740 Mon Sep 17 00:00:00 2001 From: Philipp Date: Thu, 4 Dec 2025 18:04:52 +0100 Subject: [PATCH] fix(git): update from extraConfig to settings --- modules/home/tools/git/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/modules/home/tools/git/default.nix b/modules/home/tools/git/default.nix index 0ab4d3e..13a2f36 100644 --- a/modules/home/tools/git/default.nix +++ b/modules/home/tools/git/default.nix @@ -13,24 +13,28 @@ let user = config.${namespace}.user; in { - options.${namespace}.tools.git = { - enable = mkEnableOption "Git"; - userName = mkOpt types.str "Philipp" "The name to configure git with."; - 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."; - signByDefault = mkOpt types.bool true "Whether to sign commits by default."; + options.${namespace} = { + tools.git = { + enable = mkEnableOption "Git"; + signingKey = mkOpt types.str "0F21E3C3" "The key ID to sign commits with."; + 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 { programs.git = { enable = true; - inherit (cfg) userName userEmail; lfs = enabled; signing = { key = cfg.signingKey; inherit (cfg) signByDefault; }; - extraConfig = { + settings = { + inherit user; init = { defaultBranch = "main"; };