From 9eb31470953e819909d537dd0d97394898cb583c Mon Sep 17 00:00:00 2001 From: Ryota Date: Thu, 29 Jan 2026 21:31:23 +0000 Subject: [PATCH] systemd: check for yubikey-touch-detector --- modules/home-manager/sops.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/sops.nix b/modules/home-manager/sops.nix index 0b93194..66896d0 100644 --- a/modules/home-manager/sops.nix +++ b/modules/home-manager/sops.nix @@ -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 = {