mirror of
https://github.com/nix-community/home-manager
synced 2024-11-30 06:59:45 +01:00
git: add config option for gpg.format
git provides three options for signing key format, openpgp(default), ssh, and x509. This commit provides the option to specify one of the other two available formats.
This commit is contained in:
parent
086f619dd9
commit
1b5fabc20a
3 changed files with 14 additions and 0 deletions
|
@ -38,6 +38,17 @@ let
|
|||
defaultText = "\${pkgs.gnupg}/bin/gpg2";
|
||||
description = "Path to GnuPG binary to use.";
|
||||
};
|
||||
|
||||
gpgFormat = mkOption {
|
||||
type = types.str;
|
||||
default = "openpgp";
|
||||
defaultText = "openpgp";
|
||||
description = ''
|
||||
Specifies which key format to use when signing with
|
||||
--gpg-sign. Default is "openpgp". Other possible values
|
||||
are "x509", "ssh".
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -421,6 +432,7 @@ in {
|
|||
commit.gpgSign = mkDefault cfg.signing.signByDefault;
|
||||
tag.gpgSign = mkDefault cfg.signing.signByDefault;
|
||||
gpg.program = cfg.signing.gpgPath;
|
||||
gpg.format = cfg.signing.gpgFormat;
|
||||
};
|
||||
})
|
||||
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
smudge = "git-lfs smudge -- %f"
|
||||
|
||||
[gpg]
|
||||
format = "ssh"
|
||||
program = "path-to-gpg"
|
||||
|
||||
[interactive]
|
||||
|
|
|
@ -55,6 +55,7 @@ in {
|
|||
}
|
||||
];
|
||||
signing = {
|
||||
gpgFormat = "ssh";
|
||||
gpgPath = "path-to-gpg";
|
||||
key = "00112233445566778899AABBCCDDEEFF";
|
||||
signByDefault = true;
|
||||
|
|
Loading…
Reference in a new issue