aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/profiles/security/default.nix26
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" ];
+ };
+ };
+ };
};
}