at 24.11-pre 543 B view raw
1{ config, lib, pkgs, ... }: 2let cfg = config.programs.yubikey-touch-detector; 3in { 4 options = { 5 programs.yubikey-touch-detector = { 6 enable = lib.mkEnableOption "yubikey-touch-detector"; 7 }; 8 }; 9 10 config = lib.mkIf cfg.enable { 11 systemd.packages = [ pkgs.yubikey-touch-detector ]; 12 13 systemd.user.services.yubikey-touch-detector = { 14 path = [ pkgs.gnupg ]; 15 wantedBy = [ "graphical-session.target" ]; 16 }; 17 systemd.user.sockets.yubikey-touch-detector = { 18 wantedBy = [ "sockets.target" ]; 19 }; 20 }; 21}