nixos-config/users/simon/modules/gpg.nix

31 lines
702 B
Nix
Raw Normal View History

2024-01-17 10:39:11 +01:00
# SPDX-FileCopyrightText: 2020-2024 Simon Bruder <simon@sbruder.de>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
2023-12-20 23:32:44 +01:00
{ nixosConfig, ... }:
{
programs.gpg = {
enable = true;
settings = {
default-key = "47E7559E037A35652DBBF8AA8D3C82F9F309F8EC";
2024-01-17 10:39:11 +01:00
keyid-format = "none";
with-fingerprint = false;
with-subkey-fingerprint = true;
};
};
2023-12-20 23:32:44 +01:00
services.gpg-agent = rec {
enable = true;
enableZshIntegration = true;
enableSshSupport = true;
pinentryFlavor = if nixosConfig.sbruder.gui.enable then "gnome3" else "curses";
defaultCacheTtl = 300;
defaultCacheTtlSsh = defaultCacheTtl;
maxCacheTtl = 1800;
maxCacheTtlSsh = maxCacheTtl;
};
}