nixos/home/modules/gpg/default.nix

37 lines
703 B
Nix
Raw Normal View History

2025-01-10 21:40:44 +08:00
{ config, lib, ... }:
{
options = {
youthlic.programs.gpg = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
example = false;
description = ''
whether enable gpg
'';
};
};
};
config =
let
cfg = config.youthlic.programs.gpg;
in
lib.mkIf cfg.enable {
services.gpg-agent = {
enable = true;
enableSshSupport = true;
};
programs.gpg = {
enable = true;
mutableKeys = true;
mutableTrust = true;
publicKeys = [
{
source = ./public-key.txt;
trust = "ultimate";
}
];
};
};
}