blob: 6f23ad967de8e03b6fc624933a9ec49a62513a56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
{ config, lib, pkgs, ... }:
let
cfg = config.modules.gpg;
inherit (lib) mkEnableOption mkOption mkIf types;
in
{
options.modules.gpg = {
enable = mkEnableOption "gpg";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
# pinentry-qt
];
# home.packages = with pkgs; [
# pinentry-bemenu
# (writeShellScriptBin "pinentry-menu" ''
# exec ${pkgs.pinentry-bemenu}/bin/pinentry-bemenu -l 10 --nf "#4c4c4c" --nb "#0f0f0f" --af "#4c4c4c" --ab "#0f0f0f" --tb "#0f0f0f" --tf "#8aac8b" --sb "#0f0f0f" --sf "#8aac8b"--hb "#0f0f0f" --hf "#8aac8b" --fn "ComicShannsMono Nerd Font Mono 12"
# '')];
services.gpg-agent = {
enable = true;
# TODO: look into forwarding and extra socket, seems useful
enableBashIntegration = true;
enableZshIntegration = true;
# enableNushellIntegration = true;
enableSshSupport = true;
noAllowExternalCache = true;
pinentryPackage = pkgs.pinentry-qt;
#sshKeys = [ "36663E191B00E51513F90FA5CF2BCE8461C297CD" ];
};
home.file.".gnupg/pinentry-dmenu.conf" = {
text = ''
asterisk= "";
prompt = "";
font = "ComicShannsMono Nerd Font Mono:size=13";
prompt_fg = "#cacaca";
prompt_bg = "#0d0d0d";
normal_fg = "#4c4c4c";
normal_bg = "#0d0d0d";
select_fg = "#8aac8b";
select_bg = "#0d0d0d";
desc_fg = "#cacaca";
desc_bg = "#0d0d0d";
'';
};
};
}
|