chore: refactor user modules

This commit is contained in:
2025-07-27 22:50:25 +02:00
parent af1a606c1a
commit d200079cdb
94 changed files with 832 additions and 665 deletions

View File

@@ -0,0 +1,32 @@
{
pkgs,
lib,
config,
...
}:
with lib; let
cfg = config.home.security.gpg;
in {
options.home.security.gpg = {
enable = mkEnableOption "Enable GPG";
pinentry.package = mkOption {
type = types.package;
default =
if config.home.dev.editors.emacs.enable
then pkgs.pinentry-emacs
else pkgs.pinentry-gtk2;
};
};
config = mkIf cfg.enable {
programs.gpg = {
inherit (cfg) enable;
mutableKeys = true;
mutableTrust = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = true;
pinentry.package = cfg.pinentry.package;
};
};
}