From 63e3bee66ca20f1bafd7f8961cbc46943b0df844 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Wed, 31 Aug 2022 11:43:30 +0200 Subject: [PATCH] :rocket: add git identity option --- modules/programs/git.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/programs/git.nix b/modules/programs/git.nix index 9521b17..46c2885 100644 --- a/modules/programs/git.nix +++ b/modules/programs/git.nix @@ -20,6 +20,16 @@ in type = types.bool; example = true; }; + identity = { + name = mkOption { + default = "Moritz Böhme"; + type = types.str; + }; + email = mkOption { + default = "mail@moritzboeh.me"; + type = types.str; + }; + }; }; config = mkIf cfg.enable { @@ -38,8 +48,8 @@ in home-manager.users.moritz = { programs.git = { enable = true; - userName = "Moritz Böhme"; - userEmail = "mail@moritzboeh.me"; + userName = cfg.identity.name; + userEmail = cfg.identity.email; extraConfig = { init.defaultBranch = "main"; merge.conflictstyle = "diff3";