30 lines
608 B
Nix
30 lines
608 B
Nix
{ 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}";
|
|
};
|
|
};
|
|
}
|