32 lines
914 B
Nix
32 lines
914 B
Nix
{ config, lib, ... }:
|
|
|
|
{
|
|
options.chvp.gnupg.pinentryFlavor = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "curses";
|
|
example = "qt";
|
|
description = ''
|
|
Pinentry flavor for gnupg.
|
|
'';
|
|
};
|
|
|
|
config.chvp.zfs.homeLinks = [
|
|
{ path = ".gnupg/crls.d"; type = "data"; }
|
|
{ path = ".gnupg/private-keys-v1.d"; type = "data"; }
|
|
{ path = ".gnupg/pubring.kbx"; type = "data"; }
|
|
{ path = ".gnupg/trustdb.gpg"; type = "data"; }
|
|
];
|
|
config.programs.gnupg.agent.enable = true;
|
|
config.home-manager.users.charlotte = { lib, ... }: {
|
|
home.activation.fixPermissionsCommands = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
|
chmod u=rwX,go= /home/charlotte/.gnupg
|
|
'';
|
|
programs.gpg.enable = true;
|
|
services.gpg-agent = {
|
|
enable = true;
|
|
defaultCacheTtl = 7200;
|
|
maxCacheTtl = 99999;
|
|
pinentryFlavor = config.chvp.gnupg.pinentryFlavor;
|
|
};
|
|
};
|
|
}
|