systemd: check for yubikey-touch-detector

This commit is contained in:
Ryota 2026-01-29 21:31:23 +00:00
parent dae3f7896f
commit 9eb3147095
No known key found for this signature in database

View file

@ -8,6 +8,9 @@
let
cfg = config.sops;
sops-install-secrets = cfg.package;
# Check if yubikey-touch-detector is enabled for ordering dependency
yubikeyTouchDetectorEnabled = config.services.yubikey-touch-detector.enable or false;
secretType = lib.types.submodule (
{ name, ... }:
{
@ -406,7 +409,9 @@ in
systemd.user.services.sops-nix = lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
Unit = {
Description = "sops-nix activation";
After = cfg.age.systemdDeps;
After = cfg.age.systemdDeps
++ lib.optional (cfg.age.requirePcscd && yubikeyTouchDetectorEnabled)
"yubikey-touch-detector.service";
Wants = cfg.age.systemdDeps;
};
Service = {