Working on modularizing stuff, again
This commit is contained in:
parent
b698ce3485
commit
9ba5f8fdf0
32 changed files with 1481 additions and 88 deletions
31
modules/shell/toolset/gnupg.nix
Normal file
31
modules/shell/toolset/gnupg.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, options, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (builtins) getEnv;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
cfg = config.modules.shell.toolset.gnupg;
|
||||
in
|
||||
{
|
||||
options.modules.shell.toolset.gnupg = let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in { enable = mkEnableOption "cryptographic suite"; };
|
||||
|
||||
config = mkIf config.modules.shell.toolset.gnupg.enable {
|
||||
environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg";
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
settings = let
|
||||
cacheTTL = 86400;
|
||||
in {
|
||||
default-cache-ttl = cacheTTL;
|
||||
default-cache-ttl-ssh = cacheTTL;
|
||||
max-cache-ttl = cacheTTL;
|
||||
max-cache-ttl-ssh = cacheTTL;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue