summaryrefslogtreecommitdiff
path: root/home/pc/modules/pass.nix
diff options
context:
space:
mode:
Diffstat (limited to 'home/pc/modules/pass.nix')
-rw-r--r--home/pc/modules/pass.nix24
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;
+ };
};
}