make some git options nullable to make things work
This commit is contained in:
parent
4b14003286
commit
5b89920a90
1 changed files with 8 additions and 5 deletions
|
@ -10,15 +10,18 @@ in {
|
||||||
options.myOptions.programs.git = {
|
options.myOptions.programs.git = {
|
||||||
enable = mkEnableOption "git";
|
enable = mkEnableOption "git";
|
||||||
userName = mkOption {
|
userName = mkOption {
|
||||||
type = types.str;
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
description = "git username";
|
description = "git username";
|
||||||
};
|
};
|
||||||
userEmail = mkOption {
|
userEmail = mkOption {
|
||||||
type = types.str;
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
description = "git email";
|
description = "git email";
|
||||||
};
|
};
|
||||||
signingKey = mkOption {
|
signingKey = mkOption {
|
||||||
type = types.str;
|
type = with types; nullOr str;
|
||||||
|
default = null;
|
||||||
description = "git commit signing key";
|
description = "git commit signing key";
|
||||||
};
|
};
|
||||||
editor = mkOption {
|
editor = mkOption {
|
||||||
|
@ -46,10 +49,10 @@ in {
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
commit = {
|
commit = {
|
||||||
verbose = true;
|
verbose = true;
|
||||||
gpgsign = true;
|
gpgsign = cfg.signingKey != null;
|
||||||
};
|
};
|
||||||
gpg.format = "ssh";
|
gpg.format = "ssh";
|
||||||
user.signingkey = "key::${cfg.signingKey}";
|
user.signingkey = mkIf (cfg.signingKey != null) "key::${cfg.signingKey}";
|
||||||
merge.conflictstyle = "zdiff3";
|
merge.conflictstyle = "zdiff3";
|
||||||
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
||||||
diff.algorithm = "histogram";
|
diff.algorithm = "histogram";
|
||||||
|
|
Loading…
Reference in a new issue