nixos/homeConfig/modules/git/default.nix
2024-01-27 15:34:21 -05:00

22 lines
454 B
Nix

{ lib, pkgs, config, ... }:
with lib;
let cfg = config.modules.git;
isBryan = config.user.name == "bryan";
in
{ options.modules.git = { enable = mkEnableOption "git"; };
config = mkIf cfg.enable {
programs = {
git = if isBryan then import ./config/git.nix else { enable = true; };
gh = {
enable = true;
settings.git_protocol = "ssh";
};
};
home.packages = with pkgs; [
git-crypt
];
};
}