Skip to content

Commit

Permalink
[GnuPG] option -> let binding
Browse files Browse the repository at this point in the history
  • Loading branch information
Icy-Thought committed May 15, 2024
1 parent 9a5ebbd commit 160433a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions modules/shell/toolset/gnupg.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
in {
options.modules.shell.toolset.gnupg = let
inherit (lib.options) mkEnableOption;
inherit (lib.types) int;
inherit (lib.my) mkOpt;
in {
enable = mkEnableOption "cryptographic suite";
cacheTTL = mkOpt int 86400; # 24 hours
};

config = mkIf config.modules.shell.toolset.gnupg.enable {
Expand All @@ -27,11 +24,13 @@ in {
enableSSHSupport = true;
pinentryPackage = pkgs.pinentry-gnome3;

settings = {
default-cache-ttl = cfg.cacheTTL;
default-cache-ttl-ssh = cfg.cacheTTL;
max-cache-ttl = cfg.cacheTTL;
max-cache-ttl-ssh = cfg.cacheTTL;
settings = let
cacheTTL = 86400;
in {
default-cache-ttl = cacheTTL;
default-cache-ttl-ssh = cacheTTL;
max-cache-ttl = cacheTTL;
max-cache-ttl-ssh = cacheTTL;
};
};
};
Expand Down

0 comments on commit 160433a

Please sign in to comment.