diff options
author | tomf <tom@tom-fitzhenry.me.uk> | 2023-09-14 20:15:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-14 20:15:32 +0000 |
commit | e5d8baafcdfb307c6438bf28f2fd7495fea9833d (patch) | |
tree | f513d13f9a7ad1764de99ed618042e884e0ea503 /nixos/modules/programs | |
parent | 2cd86bf59a9441072f9d557099d4b6385c3a4582 (diff) |
nixos/yubikey-touch-detector: init (#254947)
* nixos/yubikey-touch-detector: init * nixos/yubikey-touch-detector: enable user socket
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/yubikey-touch-detector.nix | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/modules/programs/yubikey-touch-detector.nix b/nixos/modules/programs/yubikey-touch-detector.nix new file mode 100644 index 0000000000000..9a0d107f73c98 --- /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" ]; + }; + }; +} |