add includes passthrough to git module

This commit is contained in:
jacekpoz 2024-08-28 21:50:56 +02:00
parent ab89b24e84
commit f59e56dee2
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -10,7 +10,7 @@
inherit (lib.meta) getExe; inherit (lib.meta) getExe;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption mkOption; inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) nullOr str; inherit (lib.types) attrs listOf nullOr str;
delta = getExe pkgs.delta; delta = getExe pkgs.delta;
in { in {
@ -41,13 +41,18 @@ in {
default = "main"; default = "main";
description = "default git branch"; description = "default git branch";
}; };
includes = mkOption {
type = listOf attrs;
default = [];
description = "passthrough to the hm module";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
programs.git = { programs.git = {
enable = true; enable = true;
inherit (cfg) userName userEmail; inherit (cfg) userName userEmail includes;
extraConfig = { extraConfig = {
core = { core = {
inherit (cfg) editor; inherit (cfg) editor;