Home Gen447 @ 2025-02-12-14:28

This commit is contained in:
2025-02-12 14:29:00 +01:00
parent aa96e0eae8
commit cb28c3492a
2 changed files with 41 additions and 21 deletions

View File

@@ -1,29 +1,43 @@
{
config,
lib,
pkgs,
...
}: {
programs.gpg = {
enable = true;
mutableKeys = false;
mutableTrust = false;
publicKeys = [
{
source = ../../static/keys/my_pub.asc;
trust = "ultimate";
}
];
options.yubikey = with lib; {
pinentry = mkOption {
type = types.enum ["qt" "gnome3"];
default = "qt";
description = "The pinentry flavour to use";
};
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableZshIntegration = true;
pinentryPackage = pkgs.pinentry.qt;
extraConfig = ''
allow-emacs-pinentry
'';
};
home.sessionVariables = {
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
config = {
programs.gpg = {
enable = true;
mutableKeys = false;
mutableTrust = false;
publicKeys = [
{
source = ../../static/keys/my_pub.asc;
trust = "ultimate";
}
];
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
enableZshIntegration = true;
pinentryPackage =
if config.yubikey.pinentry == "qt"
then pkgs.pinentry-qt
else pkgs.pinentry.gnome3;
extraConfig = ''
allow-emacs-pinentry
'';
};
home.sessionVariables = {
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
};
};
}