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 = {
|
||||
enable = mkEnableOption "git";
|
||||
userName = mkOption {
|
||||
type = types.str;
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "git username";
|
||||
};
|
||||
userEmail = mkOption {
|
||||
type = types.str;
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "git email";
|
||||
};
|
||||
signingKey = mkOption {
|
||||
type = types.str;
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
description = "git commit signing key";
|
||||
};
|
||||
editor = mkOption {
|
||||
|
@ -46,10 +49,10 @@ in {
|
|||
push.autoSetupRemote = true;
|
||||
commit = {
|
||||
verbose = true;
|
||||
gpgsign = true;
|
||||
gpgsign = cfg.signingKey != null;
|
||||
};
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "key::${cfg.signingKey}";
|
||||
user.signingkey = mkIf (cfg.signingKey != null) "key::${cfg.signingKey}";
|
||||
merge.conflictstyle = "zdiff3";
|
||||
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
||||
diff.algorithm = "histogram";
|
||||
|
|
Loading…
Reference in a new issue