30 lines
515 B
Nix
30 lines
515 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
with lib;
|
|
{
|
|
options.my.pgp.enable = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
example = false;
|
|
description = ''
|
|
Add GPG keyring and GPG Agent configuration.
|
|
'';
|
|
};
|
|
|
|
config = mkIf config.my.pgp.enable {
|
|
programs.gpg.enable = true;
|
|
|
|
services.gpg-agent = {
|
|
enable = true;
|
|
enableScDaemon = true;
|
|
enableSshSupport = true;
|
|
sshKeys = [ "40DE2FEE4D3C5E2C" ];
|
|
pinentryPackage = pkgs.pinentry-curses;
|
|
};
|
|
};
|
|
}
|