bonfire/modules/shell/git.nix
2023-06-06 23:18:09 +05:00

31 lines
852 B
Nix

{ config, options, lib, pkgs, ... }:
with lib;
with lib.custom;
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.git-annex
unstable.gitAndTools.gh
gitAndTools.git-open
gitAndTools.diff-so-fancy
(mkIf config.modules.shell.gnupg.enable gitAndTools.git-crypt)
act
];
home.configFile = {
"git/config".source = "${configDir}/git/config";
"git/ignore".source = "${configDir}/git/ignore";
"git/attributes".source = "${configDir}/git/attributes";
};
modules.shell.zsh.rcFiles = [ "${configDir}/git/aliases.zsh" ];
};
}