feat: add CLI tools to git module
This commit is contained in:
26
home/modules/git/default.nix
Normal file
26
home/modules/git/default.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
dotsPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
options = {
|
||||
github.enable = lib.mkEnableOption "Github CLI";
|
||||
gitlab.enable = lib.mkEnableOption "Gitlab CLI";
|
||||
};
|
||||
|
||||
config = {
|
||||
programs.git.enable = true;
|
||||
home.file = {
|
||||
".gitconfig".source = dotsPath + "/.gitconfig";
|
||||
".gitconfig.work".source = dotsPath + "/.gitconfig.work";
|
||||
".gitignore".source = dotsPath + "/.gitignore";
|
||||
};
|
||||
|
||||
programs.gh.enable = config.github.enable;
|
||||
home.packages = with pkgs; lib.optionals (config.gitlab.enable) [ glab ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user