helm/modules/shell/git.nix
2021-03-01 20:43:12 -05:00

29 lines
657 B
Nix

{ config, options, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.shell.git;
configDir = config.dotfiles.configDir;
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" ];
};
}