From 9d16ea61451aff36963cef3610ac8d51ed0b488b Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 16 Mar 2016 01:57:03 +0100 Subject: krebs types += pgp-pubkey, user.pgp.pubkey --- krebs/3modules/tv/default.nix | 2 +- krebs/4lib/types.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'krebs') diff --git a/krebs/3modules/tv/default.nix b/krebs/3modules/tv/default.nix index dd1f0d289..262f508c3 100644 --- a/krebs/3modules/tv/default.nix +++ b/krebs/3modules/tv/default.nix @@ -357,7 +357,7 @@ with config.krebs.lib; }; tv = { mail = "tv@nomic.retiolum"; - pgp.pubkey = '' + pgp.pubkeys.default = '' -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBFbJ/B0BEADZx8l5gRurzhEHcc3PbBepdZqDJQZ2cGHixi8VEk9iN25qJO5y HB0q5sQRsh7oNCbzKp6qRhaG9kXmEda+Uu+qbHWxE32QcT76+W8npH73qthaFwC/ diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index ed6ae9e4f..112984445 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -165,6 +165,16 @@ types // rec { type = username; default = config._module.args.name; }; + pgp.pubkeys = mkOption { + type = attrsOf pgp-pubkey; + default = {}; + description = '' + Set of user's PGP public keys. + + Modules supporting PGP may use well-known key names to define option + defaults, e.g. using `getAttrDef well-known-name pubkeys`. + ''; + }; pubkey = mkOption { type = nullOr ssh-pubkey; default = null; @@ -180,6 +190,9 @@ types // rec { addr = str; addr4 = str; addr6 = str; + + pgp-pubkey = str; + ssh-pubkey = str; ssh-privkey = submodule { options = { -- cgit v1.2.3