refactor: extract gpg config
This commit is contained in:
parent
35550c6085
commit
8f1ca25dba
10 changed files with 10 additions and 130 deletions
41
gpg/default.nix
Normal file
41
gpg/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{ pkgs, gpgSSHKeys, ... }:
|
||||
|
||||
{
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
enableSshSupport = true;
|
||||
sshKeys = gpgSSHKeys;
|
||||
defaultCacheTtl = 3600 * 12;
|
||||
defaultCacheTtlSsh = 3600 * 12;
|
||||
maxCacheTtl = 3600 * 12;
|
||||
maxCacheTtlSsh = 3600 * 12;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
};
|
||||
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
mutableKeys = false;
|
||||
mutableTrust = false;
|
||||
settings = {
|
||||
pinentry-mode = "loopback";
|
||||
};
|
||||
publicKeys = [
|
||||
{
|
||||
source = ./molez.pub.asc;
|
||||
trust = "ultimate";
|
||||
}
|
||||
{
|
||||
source = ./vi-bim.pub.asc;
|
||||
trust = "ultimate";
|
||||
}
|
||||
{
|
||||
source = ./horsch.pub.asc;
|
||||
trust = "ultimate";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue