depot/third_party/nixpkgs/nixos/modules/programs/yubikey-touch-detector.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

21 lines
543 B
Nix

{ config, lib, pkgs, ... }:
let cfg = config.programs.yubikey-touch-detector;
in {
options = {
programs.yubikey-touch-detector = {
enable = lib.mkEnableOption "yubikey-touch-detector";
};
};
config = lib.mkIf cfg.enable {
systemd.packages = [ pkgs.yubikey-touch-detector ];
systemd.user.services.yubikey-touch-detector = {
path = [ pkgs.gnupg ];
wantedBy = [ "graphical-session.target" ];
};
systemd.user.sockets.yubikey-touch-detector = {
wantedBy = [ "sockets.target" ];
};
};
}