mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 15:14:26 +00:00
gpg: can configure scdaemon.conf (#1960)
This commit is contained in:
parent
18ad12d52b
commit
c0ba8c526d
1 changed files with 25 additions and 0 deletions
|
@ -15,6 +15,11 @@ let
|
|||
listsAsDuplicateKeys = true;
|
||||
} cfg.settings;
|
||||
|
||||
scdaemonCfgText = generators.toKeyValue {
|
||||
inherit mkKeyValue;
|
||||
listsAsDuplicateKeys = true;
|
||||
} cfg.scdaemonSettings;
|
||||
|
||||
primitiveType = types.oneOf [ types.str types.bool ];
|
||||
in
|
||||
{
|
||||
|
@ -44,6 +49,20 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
scdaemonSettings = mkOption {
|
||||
type = types.attrsOf (types.either primitiveType (types.listOf types.str));
|
||||
example = literalExample ''
|
||||
{
|
||||
disable-ccid = true;
|
||||
}
|
||||
'';
|
||||
description = ''
|
||||
SCdaemon configuration options. Available options are described
|
||||
in the gpg scdaemon manpage:
|
||||
<link xlink:href="https://www.gnupg.org/documentation/manuals/gnupg/Scdaemon-Options.html"/>.
|
||||
'';
|
||||
};
|
||||
|
||||
homedir = mkOption {
|
||||
type = types.path;
|
||||
example = literalExample "\"\${config.xdg.dataHome}/gnupg\"";
|
||||
|
@ -75,11 +94,17 @@ in
|
|||
use-agent = mkDefault true;
|
||||
};
|
||||
|
||||
programs.gpg.scdaemonSettings = {
|
||||
# no defaults for scdaemon
|
||||
};
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
home.sessionVariables = {
|
||||
GNUPGHOME = cfg.homedir;
|
||||
};
|
||||
|
||||
home.file."${cfg.homedir}/gpg.conf".text = cfgText;
|
||||
|
||||
home.file."${cfg.homedir}/scdaemon.conf".text = scdaemonCfgText;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue