gpg: add dirmngrSettings and gpgsmSettings options

This commit is contained in:
Hoang Nguyen
2024-11-02 00:00:00 +07:00
committed by Matthieu Coudron
parent 47e195783e
commit 9d1c71f390
6 changed files with 98 additions and 18 deletions

View File

@@ -3,4 +3,5 @@
gpg-mutable-keyfiles = ./mutable-keyfiles.nix;
gpg-multiple-keys-trust = ./multiple-keys-trust.nix;
gpg-override-defaults = ./override-defaults.nix;
gpg-other-settings = ./other-settings.nix;
}

View File

@@ -0,0 +1,2 @@
keyserver ldaps://ldap.example.com
use-tor

View File

@@ -0,0 +1,3 @@
cipher-algo AES256
validation-model steed
with-md5-fingerprint

View File

@@ -0,0 +1,3 @@
application-priority openpgp p15 sc-hsm nks geldkarte dinsig
disable-ccid
reader-port 32769

View File

@@ -0,0 +1,32 @@
{
programs.gpg = {
enable = true;
scdaemonSettings = {
disable-ccid = true;
reader-port = "32769";
application-priority = "openpgp p15 sc-hsm nks geldkarte dinsig";
};
dirmngrSettings = {
use-tor = true;
keyserver = "ldaps://ldap.example.com";
};
gpgsmSettings = {
cipher-algo = "AES256";
with-md5-fingerprint = true;
validation-model = "steed";
};
};
nmt.script = ''
assertFileExists home-files/.gnupg/scdaemon.conf
assertFileExists home-files/.gnupg/dirmngr.conf
assertFileExists home-files/.gnupg/gpgsm.conf
assertFileContent home-files/.gnupg/scdaemon.conf ${./other-scdaemon.conf}
assertFileContent home-files/.gnupg/dirmngr.conf ${./other-dirmngr.conf}
assertFileContent home-files/.gnupg/gpgsm.conf ${./other-gpgsm.conf}
'';
}