nixfleet/users/profiles/git/default.nix
Andrea Ciceri 4d356b3a06
Several changes:
- gpg working in darwin
- new git full package
- git settings for darwin (using different account)
- updaded techinque to detect host platform
2021-11-03 18:29:40 +01:00

36 lines
703 B
Nix

{ pkgs, ... }:
let
config =
if pkgs.stdenv.hostPlatform.isDarwin then {
name = "Andrea Ciceri";
email = "andrea.ciceri@beatdata.it";
} else {
name = "Andrea Ciceri";
email = "andrea.ciceri@autistici.org";
};
in
{
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
extraConfig = {
pull.rebase = false;
};
userName = config.name;
userEmail = config.email;
signing = {
signByDefault = true;
key = config.email;
};
extraConfig = {
url = if pkgs.stdenv.hostPlatform.isDarwin then { } else {
"ssh://git@github.com/" = { insteadOf = https://github.com/; };
};
};
};
}