home-manager/tests/modules/programs/gpg/override-defaults.nix
Nicolas Berbiche eb3a0342a8
gpg: allow for duplicate keys in config (#1814)
Allow for duplicate keys in the form of a list of strings.

Also update the `settings` example configuration to use `literalExample`.
2021-02-21 00:37:46 -05:00

27 lines
492 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
programs.gpg = {
enable = true;
settings = {
no-comments = false;
s2k-cipher-algo = "AES128";
throw-keyids = true;
trusted-key = [
"0xXXXXXXXXXXXXX"
"0xYYYYYYYYYYYYY"
];
};
};
nmt.script = ''
assertFileExists home-files/.gnupg/gpg.conf
assertFileContent home-files/.gnupg/gpg.conf ${./override-defaults-expected.conf}
'';
};
}