diff options
author | sefidel <contact@sefidel.net> | 2024-08-10 16:00:14 +0900 |
---|---|---|
committer | sefidel <contact@sefidel.net> | 2024-08-10 16:00:14 +0900 |
commit | 41c442a4edc7598826b8d13a8decadc6d17b30af (patch) | |
tree | 8b7913e8c43ab73a25a3ffd1ba9bab310e3246e7 /home/profiles/security | |
parent | 45dc3a4d2c00130798b8ee5c466dead270d8c13c (diff) | |
download | nixrc-41c442a4edc7598826b8d13a8decadc6d17b30af.tar.gz nixrc-41c442a4edc7598826b8d13a8decadc6d17b30af.zip |
feat(home/security): configure yubikey-touch-detector
Diffstat (limited to 'home/profiles/security')
-rw-r--r-- | home/profiles/security/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/home/profiles/security/default.nix b/home/profiles/security/default.nix index 3ff6a2e..b6842df 100644 --- a/home/profiles/security/default.nix +++ b/home/profiles/security/default.nix @@ -19,5 +19,31 @@ in pkgs.protonvpn-gui ]; + + systemd.user = lib.mkIf pkgs.stdenv.isLinux { + sockets.yubikey-touch-detector = { + Unit.Description = "Unix socket activation for YubiKey touch detector service"; + Socket = { + ListenStream = "%t/yubikey-touch-detector.socket"; + RemoveOnStop = true; + }; + Install.WantedBy = [ "sockets.target" ]; + }; + + services.yubikey-touch-detector = { + Unit = { + Description = "Detects when your YubiKey is waiting for a touch"; + Requires = "yubikey-touch-detector.socket"; + }; + Service = { + ExecStart = "${lib.getExe pkgs.yubikey-touch-detector} --libnotify"; + EnvironmentFile = "-%E/yubikey-touch-detector/service.conf"; + }; + Install = { + Also = "yubikey-touch-detector.socket"; + WantedBy = [ "default.target" ]; + }; + }; + }; }; } |