2021-11-06 19:07:06 +04:00
|
|
|
{ config, pkgs, lib, ... }: {
|
|
|
|
home-manager.users.balsoft.systemd.user.services.yubikey-touch-detector = {
|
|
|
|
Service = {
|
|
|
|
Environment = [ "PATH=${lib.makeBinPath [ pkgs.gnupg pkgs.yubikey-touch-detector ]}" ];
|
|
|
|
ExecStart = toString (pkgs.writeShellScript "yubikey-touch-detector" ''
|
|
|
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
|
|
|
yubikey-touch-detector -libnotify
|
|
|
|
'');
|
|
|
|
};
|
|
|
|
Install = rec {
|
|
|
|
WantedBy = [ "graphical-session.target" ];
|
2022-06-03 00:13:24 +04:00
|
|
|
Wants = [ "gpg-agent-ssh.socket" "gpg-agent.socket" ];
|
|
|
|
After = Wants;
|
2021-11-06 19:07:06 +04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|