Fix GPG_TTY

This commit is contained in:
Alexander Bantyev 2022-02-16 13:31:15 +03:00
parent 6644a95e30
commit edc7792b47
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 12 additions and 1 deletions

View File

@ -46,6 +46,7 @@
ExecStart = lib.mkForce
"${pkgs.pass-secret-service}/bin/pass_secret_service --path ${config.environment.variables.PASSWORD_STORE_DIR}";
Type = "dbus";
Environment = [ "GPG_TTY=/dev/tty1" "DISPLAY=:0" ];
BusName = "org.freedesktop.secrets";
};
Unit = rec {

View File

@ -1,4 +1,4 @@
{ pkgs, config, ... }: {
{ pkgs, lib, config, ... }: {
services.pcscd.enable = true;
services.udev.packages = [ pkgs.yubikey-personalization ];
@ -11,6 +11,16 @@
pinentryFlavor = "gtk2";
};
systemd.user.services.gpg-agent = {
Service = {
Environment = lib.mkForce [
"GPG_TTY=/dev/tty1"
"DISPLAY=:0"
"GNUPGHOME=${config.home-manager.users.balsoft.xdg.dataHome}/gnupg"
];
};
};
programs.gpg = {
enable = true;
homedir = "${config.home-manager.users.balsoft.xdg.dataHome}/gnupg";