1 { config, lib, pkgs, ... }:
2 let cfg = config.programs.yubikey-touch-detector;
5 programs.yubikey-touch-detector = {
6 enable = lib.mkEnableOption "yubikey-touch-detector";
10 config = lib.mkIf cfg.enable {
11 systemd.packages = [ pkgs.yubikey-touch-detector ];
13 systemd.user.services.yubikey-touch-detector = {
14 path = [ pkgs.gnupg ];
15 wantedBy = [ "graphical-session.target" ];
17 systemd.user.sockets.yubikey-touch-detector = {
18 wantedBy = [ "sockets.target" ];