Move gnupg configuration to common profile

This commit is contained in:
Charlotte Van Petegem 2020-05-23 11:41:18 +02:00
parent eadf45ae15
commit 1d2f2d5d1b
4 changed files with 18 additions and 8 deletions

View file

@ -6,7 +6,7 @@
default = "charlotte@vanpetegem.me";
example = "charlotte@vanpetegem.me";
description = ''
Default email set in git config
Default email set in global git config.
'';
};

View file

@ -1,14 +1,23 @@
{ ... }:
{ config, lib, ... }:
{
custom.zfs.homeLinks = [
options.custom.gnupg.pinentryFlavor = lib.mkOption {
type = lib.types.str;
default = "curses";
example = "qt";
description = ''
Pinentry flavor for gnupg.
'';
};
config.custom.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"; }
];
programs.gnupg.agent.enable = true;
home-manager.users.charlotte = { pkgs, ... }: {
config.programs.gnupg.agent.enable = true;
config.home-manager.users.charlotte = { pkgs, ... }: {
programs = {
gpg.enable = true;
};
@ -16,7 +25,7 @@
enable = true;
defaultCacheTtl = 7200;
maxCacheTtl = 99999;
pinentryFlavor = "qt";
pinentryFlavor = config.custom.gnupg.pinentryFlavor;
};
};
}