diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-06-26 15:05:28 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-06-26 15:12:26 +0530 |
commit | a8a88c53b353205be0cb9b6cba87700b2dc971a9 (patch) | |
tree | 155a7644a692ab7f47a21113b8daf6574043ffaf /home | |
parent | b924367081feb485035714fd0cb696a0633cdc0e (diff) |
home/pc/pass: setup gnupg
Diffstat (limited to 'home')
-rw-r--r-- | home/pc/modules/pass.nix | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/home/pc/modules/pass.nix b/home/pc/modules/pass.nix index 9117c3a..3387861 100644 --- a/home/pc/modules/pass.nix +++ b/home/pc/modules/pass.nix @@ -1,10 +1,20 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ - (pass.withExtensions (exts: [ exts.pass-otp ])) - ]; +{ config, pkgs, lib, ... }: let + passStore = config.xdg.dataHome + "/pass"; + GNUPGHome = config.xdg.dataHome + "/gnupg"; +in { + home = { + file."${GNUPGHome}/gpg-agent.conf".text = '' + pinentry-program ${lib.getExe pkgs.pinentry-bemenu} + ''; - services.gpg-agent = { - enable = true; - pinentryPackage = pkgs.pinentry-bemenu; + packages = with pkgs; [ + pinentry-bemenu + (pass.withExtensions (exts: [ exts.pass-otp ])) + ]; + + sessionVariables = { + PASSWORD_STORE_DIR = passStore; + GNUPGHOME = GNUPGHome; + }; }; } |