blob: 4506d65fb77defa4c9d37daaca2176dc9410096c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.gpg;
inherit (lib)
mkEnableOption
mkOption
mkIf
types
;
in
{
options.modules.gpg = {
enable = mkEnableOption "gpg";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
pinentry-qt
];
programs.gpg = {
scdaemonSettings = {
disable-ccid = true;
};
settings = {
no-comments = true;
fixed-list-mode = true;
no-emit-version = true;
keyd-format = "0xlong";
list-options = "show-uid-validity";
verify-options = "show-uid-validity";
with-fingerprint = true;
require-cross-certification = true;
no-symkey-cache = true;
use-agent = true;
throw-keyds = true;
personal-cipher-preferences = "AES256 AES192 AES";
personal-digest-preferences = "SHA512 SHA384 SHA256";
personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed";
default-preference-list = "SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed";
cert-digest-algo = "SHA512";
s2k-digest-algo = "SHA512";
s2k-cipher-algo = "AES256";
charset = "utf-8";
};
};
services.gpg-agent = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
defaultCacheTtl = 60;
maxCacheTtl = 120;
enableSshSupport = true;
noAllowExternalCache = true;
pinentryPackage = pkgs.pinentry-qt;
sshKeys = [
"36663E191B00E51513F90FA5CF2BCE8461C297CD"
"97D70F96084527401BBA8AB714165B7413D13345"
];
};
};
}
|