diff --git a/nix/homeModules/common/git.nix b/nix/homeModules/common/git.nix index b11e4c40..96afffa4 100644 --- a/nix/homeModules/common/git.nix +++ b/nix/homeModules/common/git.nix @@ -55,19 +55,30 @@ }; programs.git.includes = let - universityIdentity = url: { - condition = "hasconfig:remote.*.url:git@${url}:*/**"; - contents = { - init.defaultBranch = "main"; - user = { - name = "Léana CHIANG"; - email = "leana.chiang@etudiant.univ-rennes1.fr"; - signingKey = "0x32035DB97E777EEB"; - }; + mkIdentity = condition: contents: {inherit condition contents;}; + hostCondition = url: "hasconfig:remote.*.url:git@${url}:*/**"; + + universityIdentity = { + init.defaultBranch = "main"; + user = { + name = "Léana CHIANG"; + email = "leana.chiang@etudiant.univ-rennes1.fr"; + signingKey = "0x32035DB97E777EEB"; }; }; + haskellIdentity = { + init.defaultBranch = "main"; + user.name = "Léana Jiang"; + }; in [ - (universityIdentity "gitlab.istic.univ-rennes1.fr") - (universityIdentity "gitlab2.istic.univ-rennes1.fr") + (mkIdentity + (hostCondition "gitlab.istic.univ-rennes1.fr") + universityIdentity) + (mkIdentity + (hostCondition "gitlab2.istic.univ-rennes1.fr") + universityIdentity) + (mkIdentity + (hostCondition "gitlab.haskell.org") + haskellIdentity) ]; }