mirror of
https://github.com/nix-community/home-manager
synced 2025-01-11 19:49:49 +01: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;
|
listsAsDuplicateKeys = true;
|
||||||
} cfg.settings;
|
} cfg.settings;
|
||||||
|
|
||||||
|
scdaemonCfgText = generators.toKeyValue {
|
||||||
|
inherit mkKeyValue;
|
||||||
|
listsAsDuplicateKeys = true;
|
||||||
|
} cfg.scdaemonSettings;
|
||||||
|
|
||||||
primitiveType = types.oneOf [ types.str types.bool ];
|
primitiveType = types.oneOf [ types.str types.bool ];
|
||||||
in
|
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 {
|
homedir = mkOption {
|
||||||
type = types.path;
|
type = types.path;
|
||||||
example = literalExample "\"\${config.xdg.dataHome}/gnupg\"";
|
example = literalExample "\"\${config.xdg.dataHome}/gnupg\"";
|
||||||
|
@ -75,11 +94,17 @@ in
|
||||||
use-agent = mkDefault true;
|
use-agent = mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.gpg.scdaemonSettings = {
|
||||||
|
# no defaults for scdaemon
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = [ cfg.package ];
|
home.packages = [ cfg.package ];
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
GNUPGHOME = cfg.homedir;
|
GNUPGHOME = cfg.homedir;
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file."${cfg.homedir}/gpg.conf".text = cfgText;
|
home.file."${cfg.homedir}/gpg.conf".text = cfgText;
|
||||||
|
|
||||||
|
home.file."${cfg.homedir}/scdaemon.conf".text = scdaemonCfgText;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue