diff options
Diffstat (limited to 'home/git')
-rw-r--r-- | home/git/default.nix | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/home/git/default.nix b/home/git/default.nix index bd7295e..cf6419c 100644 --- a/home/git/default.nix +++ b/home/git/default.nix @@ -1,12 +1,18 @@ -{...}: { +{pkgs,lib,...}: let inherit (lib.modules) mkIf; +inherit (pkgs.stdenv.hostPlatform) isDarwin; +in { programs.git = { enable = true; # Set privacy-respecting user information. userName = "Linnnus"; userEmail = "[email protected]"; + + extraConfig.credential.helper = mkIf isDarwin [ "osxkeychain" ]; }; + programs.git-credential-lastpass.enable = !isDarwin; + home.shellAliases = { gs = "git status"; gd = "git diff"; |