diff options
Diffstat (limited to 'home/profiles/security')
-rw-r--r-- | home/profiles/security/default.nix | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/home/profiles/security/default.nix b/home/profiles/security/default.nix index b64de22..2201f3e 100644 --- a/home/profiles/security/default.nix +++ b/home/profiles/security/default.nix @@ -12,7 +12,6 @@ in pkgs.yubikey-manager pkgs.age-plugin-yubikey - pkgs.keepassxc pkgs.bitwarden pkgs.bitwarden-cli @@ -20,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 -v"; + EnvironmentFile = "-%E/yubikey-touch-detector/service.conf"; + }; + Install = { + Also = "yubikey-touch-detector.socket"; + WantedBy = [ "default.target" ]; + }; + }; + }; }; } |