nixpkgs/nixos/modules/programs/yubikey-touch-detector.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
543 B
Nix
Raw Normal View History

{ 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" ];
};
};
}