From 31f95124c9704d1e75c05f67e151c2d8b7505382 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 10 Jul 2025 14:24:48 -0500 Subject: [PATCH] sam: Conditionally configure git email --- sam/configuration.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sam/configuration.nix b/sam/configuration.nix index 889ec17..0d29512 100644 --- a/sam/configuration.nix +++ b/sam/configuration.nix @@ -85,7 +85,6 @@ programs.git = { enable = true; - userEmail = "chandler@chandlerswift.com"; userName = "Chandler Swift"; lfs.enable = true; # TODO: delta or diff-so-fancy or difftastic @@ -109,6 +108,16 @@ "venv" ".direnv" ]; + includes = [ + { + condition = "gitdir:/home/chandler/work/"; + contents.user.email = "chandler.swift@pearson.com"; + } + { + condition = "gitdir:/home/chandler/projects/"; + contents.user.email = "chandler+pearson@chandlerswift.com"; + } + ]; hooks = { pre-commit = ../git-pre-commit-hook; };