mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
e5d8baafcd
* nixos/yubikey-touch-detector: init * nixos/yubikey-touch-detector: enable user socket
21 lines
543 B
Nix
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" ];
|
|
};
|
|
};
|
|
}
|