2020-10-01 15:46:04 -07:00
|
|
|
{ config, options, lib, pkgs, ... }:
|
2019-08-06 10:56:54 -07:00
|
|
|
|
2020-03-28 22:48:43 -07:00
|
|
|
with lib;
|
2020-10-01 15:46:04 -07:00
|
|
|
with lib.my;
|
|
|
|
let cfg = config.modules.shell.git;
|
2021-03-01 17:43:12 -08:00
|
|
|
configDir = config.dotfiles.configDir;
|
2020-10-01 15:46:04 -07:00
|
|
|
in {
|
2020-03-28 22:48:43 -07:00
|
|
|
options.modules.shell.git = {
|
2020-10-01 15:46:04 -07:00
|
|
|
enable = mkBoolOpt false;
|
2020-03-28 22:48:43 -07:00
|
|
|
};
|
|
|
|
|
2020-10-01 15:46:04 -07:00
|
|
|
config = mkIf cfg.enable {
|
|
|
|
user.packages = with pkgs; [
|
|
|
|
gitAndTools.gh
|
2020-10-05 14:00:17 -07:00
|
|
|
gitAndTools.git-open
|
2020-10-01 15:46:04 -07:00
|
|
|
gitAndTools.diff-so-fancy
|
|
|
|
(mkIf config.modules.shell.gnupg.enable
|
|
|
|
gitAndTools.git-crypt)
|
2021-08-05 22:31:08 -07:00
|
|
|
act
|
2020-10-01 15:46:04 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
home.configFile = {
|
|
|
|
"git/config".source = "${configDir}/git/config";
|
|
|
|
"git/ignore".source = "${configDir}/git/ignore";
|
2021-03-06 19:31:37 -08:00
|
|
|
"git/attributes".source = "${configDir}/git/attributes";
|
2020-01-12 15:17:17 -08:00
|
|
|
};
|
2020-10-01 15:46:04 -07:00
|
|
|
|
|
|
|
modules.shell.zsh.rcFiles = [ "${configDir}/git/aliases.zsh" ];
|
2019-08-06 10:56:54 -07:00
|
|
|
};
|
|
|
|
}
|