nix/modules/home-manager/application/gnupg/default.nix

41 lines
768 B
Nix

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.application.gnupg;
in
{
options.modules.application.gnupg = {
enable = mkEnableOption "enable GnuPG and related utils";
pass = mkOption {
type = types.bool;
default = true;
description = "install password-store";
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
# pinentry-gnome
gcr
];
programs.gpg = {
enable = true;
scdaemonSettings = {
disable-ccid = true;
};
};
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableZshIntegration = true;
pinentry.package = pkgs.pinentry-gnome3;
};
programs.password-store = {
enable = cfg.pass;
};
};
}