home: put modules into folders
This commit is contained in:
parent
5b0e0bcbc2
commit
dc5a44ce82
24 changed files with 23 additions and 23 deletions
31
home/gpg/default.nix
Normal file
31
home/gpg/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.gpg;
|
||||
in
|
||||
{
|
||||
options.my.home.gpg = with lib; {
|
||||
enable = my.mkDisableOption "gpg configuration";
|
||||
|
||||
pinentry = mkOption {
|
||||
type = types.str;
|
||||
default = "tty";
|
||||
example = "gtk2";
|
||||
description = "Which pinentry interface to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true; # One agent to rule them all
|
||||
pinentryFlavor = cfg.pinentry;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue