summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-09-15 00:02:48 +0000
committerGitHub <noreply@github.com>2023-09-15 00:02:48 +0000
commit3578e69dcdd6e1c60ee277ddd159ef34c65c5557 (patch)
tree4ec0e18de9a37957a4c31e4b25389b3aace88d0d /nixos
parent3abc44a430ca2026135cbce8cd9f4a74d020f394 (diff)
parentc5cc5d49dcdf152e08ab22fc8514e1a34e900613 (diff)
downloadnixpkgs-3578e69dcdd6e1c60ee277ddd159ef34c65c5557.tar
nixpkgs-3578e69dcdd6e1c60ee277ddd159ef34c65c5557.tar.gz
nixpkgs-3578e69dcdd6e1c60ee277ddd159ef34c65c5557.tar.bz2
nixpkgs-3578e69dcdd6e1c60ee277ddd159ef34c65c5557.tar.lz
nixpkgs-3578e69dcdd6e1c60ee277ddd159ef34c65c5557.tar.xz
nixpkgs-3578e69dcdd6e1c60ee277ddd159ef34c65c5557.tar.zst
nixpkgs-3578e69dcdd6e1c60ee277ddd159ef34c65c5557.zip
Merge staging-next into staging
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/module-list.nix1
-rw-r--r--nixos/modules/programs/yubikey-touch-detector.nix21
2 files changed, 22 insertions, 0 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 2eb5f8f157b..461c43a4241 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -280,6 +280,7 @@
   ./programs/xwayland.nix
   ./programs/yabar.nix
   ./programs/yazi.nix
+  ./programs/yubikey-touch-detector.nix
   ./programs/zmap.nix
   ./programs/zsh/oh-my-zsh.nix
   ./programs/zsh/zsh-autoenv.nix
diff --git a/nixos/modules/programs/yubikey-touch-detector.nix b/nixos/modules/programs/yubikey-touch-detector.nix
new file mode 100644
index 00000000000..9a0d107f73c
--- /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" ];
+    };
+  };
+}