From 237289130c41074a78c6793cab0c5df46a518faa Mon Sep 17 00:00:00 2001 From: Alexander Bantyev Date: Sat, 6 Nov 2021 18:07:06 +0300 Subject: [PATCH] Add yubikey-touch-detector --- profiles/workspace/yubikey-touch-detector.nix | 14 ++++++++++++++ roles/desktop.nix | 1 + 2 files changed, 15 insertions(+) create mode 100644 profiles/workspace/yubikey-touch-detector.nix diff --git a/profiles/workspace/yubikey-touch-detector.nix b/profiles/workspace/yubikey-touch-detector.nix new file mode 100644 index 0000000..61b65fe --- /dev/null +++ b/profiles/workspace/yubikey-touch-detector.nix @@ -0,0 +1,14 @@ +{ config, pkgs, lib, ... }: { + home-manager.users.balsoft.systemd.user.services.yubikey-touch-detector = { + Service = { + Environment = [ "PATH=${lib.makeBinPath [ pkgs.gnupg pkgs.yubikey-touch-detector ]}" ]; + ExecStart = toString (pkgs.writeShellScript "yubikey-touch-detector" '' + export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" + yubikey-touch-detector -libnotify + ''); + }; + Install = rec { + WantedBy = [ "graphical-session.target" ]; + }; + }; +} diff --git a/roles/desktop.nix b/roles/desktop.nix index 9689051..b80f8e6 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -36,5 +36,6 @@ mopidy simple-osd-daemons sway + yubikey-touch-detector ]; }