From e5d8baafcdfb307c6438bf28f2fd7495fea9833d Mon Sep 17 00:00:00 2001 From: tomf Date: Thu, 14 Sep 2023 20:15:32 +0000 Subject: nixos/yubikey-touch-detector: init (#254947) * nixos/yubikey-touch-detector: init * nixos/yubikey-touch-detector: enable user socket --- nixos/modules/programs/yubikey-touch-detector.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 nixos/modules/programs/yubikey-touch-detector.nix (limited to 'nixos/modules/programs') diff --git a/nixos/modules/programs/yubikey-touch-detector.nix b/nixos/modules/programs/yubikey-touch-detector.nix new file mode 100644 index 00000000000..9a0d107f73c --- /dev/null +++ b/nixos/modules/programs/yubikey-touch-detector.nix @@ -0,0 +1,21 @@ +{ 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" ]; + }; + }; +} -- cgit 1.4.1