Add git module

This commit is contained in:
Yorick Barbanneau 2024-03-05 21:45:59 +01:00
parent b7c124a433
commit 04c18c06a7
5 changed files with 32 additions and 10 deletions

View file

@ -0,0 +1,30 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.git;
in
{
options.modules.cli.git = {
enable = mkEnableOption "enable git";
userName = mkOption {
type = types.str;
default = "Yorick Barbanneau";
description = "git username";
};
userEmail = mkOption {
type = types.str;
default = "ephase@xieme-art.org";
description = "git email";
};
};
config = mkIf cfg.enable {
programs.git = {
enable = true;
package = pkgs.gitFull;
userName = "${cfg.userName}";
userEmail = "${cfg.userEmail}";
};
};
}

View file

@ -3,6 +3,7 @@
imports = [
./application/imv
./application/zathura
./cli/git
./cli/neovim
./cli/vifm
./cli/zsh