helm/modules/shell/git.nix

31 lines
730 B
Nix
Raw Permalink Normal View History

{ config, options, lib, pkgs, ... }:
2019-08-06 10:56:54 -07:00
2020-03-28 22:48:43 -07:00
with lib;
with lib.my;
let cfg = config.modules.shell.git;
configDir = config.dotfiles.configDir;
in {
2020-03-28 22:48:43 -07:00
options.modules.shell.git = {
enable = mkBoolOpt false;
2020-03-28 22:48:43 -07:00
};
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)
2021-08-05 22:31:08 -07:00
act
];
home.configFile = {
"git/config".source = "${configDir}/git/config";
"git/ignore".source = "${configDir}/git/ignore";
"git/attributes".source = "${configDir}/git/attributes";
2020-01-12 15:17:17 -08:00
};
modules.shell.zsh.rcFiles = [ "${configDir}/git/aliases.zsh" ];
2019-08-06 10:56:54 -07:00
};
}