home: gpg: make it enable-able
This commit is contained in:
parent
2732d0558a
commit
58c9b60722
29
home/gpg.nix
29
home/gpg.nix
|
@ -1,15 +1,24 @@
|
||||||
{ ... }:
|
{ config, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.my.home.gpg;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
programs.gpg = {
|
options.my.home.gpg = with lib.my; {
|
||||||
enable = true;
|
enable = mkDisableOption "gpg configuration";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gpg-agent = {
|
config = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
programs.gpg = {
|
||||||
enableSshSupport = true; # One agent to rule them all
|
enable = true;
|
||||||
pinentryFlavor = "tty";
|
};
|
||||||
extraConfig = ''
|
|
||||||
allow-loopback-pinentry
|
services.gpg-agent = {
|
||||||
'';
|
enable = true;
|
||||||
|
enableSshSupport = true; # One agent to rule them all
|
||||||
|
pinentryFlavor = "tty";
|
||||||
|
extraConfig = ''
|
||||||
|
allow-loopback-pinentry
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue