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

41 lines
767 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
pkgs.gcr
];
programs.gpg = {
enable = true;
scdaemonSettings = {
disable-ccid = true;
};
};
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableZshIntegration = true;
pinentryFlavor = "gnome3";
};
programs.password-store = {
enable = cfg.pass;
};
};
}