Files
copnix/modules/nixos/common/common-git.ulu.nix
T
2026-10-09 19:06:03 +03:00

35 lines
704 B
Nix

{ ... }:
{
commonModules.common-git =
{ pkgs, ... }:
let
base = ''
[user]
name = elwrcl
email = [email protected]
signingkey = 5EA48F7312A42B84
[commit]
gpgsign = true
[tag]
gpgsign = true
'';
darwinExtra = ''
[credential]
helper = osxkeychain
'';
linuxExtra = ''
[credential]
helper = ${pkgs.gitFull}/bin/git-credential-libsecret
'';
gitconfig = pkgs.writeText "gitconfig" (
base + (if pkgs.stdenv.isDarwin then darwinExtra else linuxExtra)
);
in
{
environment.variables.GIT_CONFIG_SYSTEM = "${gitconfig}";
};
}