From 9c4feaa22bed88ac9299371f64391fd6f89ced82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Sat, 13 Jan 2024 14:51:19 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20(home/shell)=20add=20some=20git=20c?= =?UTF-8?q?onfig=20+=20parametrize=20git=20signing=20key=20according=20to?= =?UTF-8?q?=20hostname?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/shell/git.nix | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/home/shell/git.nix b/home/shell/git.nix index 6d931e9..f72ae18 100644 --- a/home/shell/git.nix +++ b/home/shell/git.nix @@ -1,12 +1,34 @@ -{...}: { +{config, ...}: let + sign_key = + { + "silicium" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@silicium"; + } + ."${config.networking.hostName}"; +in { programs.git = { enable = true; lfs.enable = true; + userName = "Laureηt"; - userEmail = "laurent@fainsin.bzh"; + userEmail = "laurent.git@fainsin.bzh"; + signing = { signByDefault = true; - key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@silicium"; + key = sign_key; + }; + + ignores = [ + ".cache" + ".DS_Store" + ".direnv" + ".venv" + "node_modules" + "result" + "result-*" + ]; + + extraConfig = { + merge.conflictstyle = "diff3"; }; }; }