2024-04-11 20:15:47 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2023-10-22 17:12:42 +02:00
|
|
|
with lib;
|
|
|
|
{
|
2024-08-01 21:40:51 +02:00
|
|
|
options.my.pgp.enable = mkOption {
|
2023-10-22 17:12:42 +02:00
|
|
|
type = types.bool;
|
|
|
|
default = true;
|
|
|
|
example = false;
|
|
|
|
description = ''
|
|
|
|
Add GPG keyring and GPG Agent configuration.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2024-08-01 21:40:51 +02:00
|
|
|
config = mkIf config.my.pgp.enable {
|
2023-10-22 17:12:42 +02:00
|
|
|
programs.gpg.enable = true;
|
|
|
|
|
|
|
|
services.gpg-agent = {
|
|
|
|
enable = true;
|
|
|
|
enableScDaemon = true;
|
|
|
|
enableSshSupport = true;
|
|
|
|
sshKeys = [ "40DE2FEE4D3C5E2C" ];
|
2024-03-19 21:41:23 +01:00
|
|
|
pinentryPackage = pkgs.pinentry-curses;
|
2023-10-22 17:12:42 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|