nixos-config/modules/workstation/home-manager/gpg.nix

25 lines
494 B
Nix

{ config, lib, ... }:
with lib;
{
options.enableGPGKeyring = mkOption {
type = types.bool;
default = true;
example = false;
description = ''
Add GPG keyring and GPG Agent configuration.
'';
};
config = mkIf config.enableGPGKeyring {
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableSshSupport = true;
sshKeys = [ "40DE2FEE4D3C5E2C" ];
pinentryFlavor = "curses";
};
};
}