helm/modules/shell/git.nix
Henrik Lissner 344ed305c5
Improve git config
+ Replace 'git browse' (hub-only) with git-open
+ Add URL aliases for github, gist and gitlab
+ Replace 'git branch' alias with 'git branch -av'
2020-10-11 01:31:33 -04:00

28 lines
614 B
Nix

{ config, options, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.shell.git;
in {
options.modules.shell.git = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
gitAndTools.gh
gitAndTools.git-open
gitAndTools.diff-so-fancy
(mkIf config.modules.shell.gnupg.enable
gitAndTools.git-crypt)
];
home.configFile = {
"git/config".source = "${configDir}/git/config";
"git/ignore".source = "${configDir}/git/ignore";
};
modules.shell.zsh.rcFiles = [ "${configDir}/git/aliases.zsh" ];
};
}