nixos-config/profiles/workspace/yubikey-touch-detector.nix

17 lines
592 B
Nix
Raw Permalink Normal View History

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" ];
Wants = [ "gpg-agent-ssh.socket" "gpg-agent.socket" ];
After = Wants;
2021-11-06 19:07:06 +04:00
};
};
}