about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-10-31 21:56:56 +0100
committerGitHub <noreply@github.com>2021-10-31 21:56:56 +0100
commit89aa3718086d3691abda832e994deeb1aa46e0e5 (patch)
tree128d9bf92cf5f4aba997bafe72cff17ffd3199d0 /nixos/modules
parentfa62029dc2c47cc50fe82bb8d0bf2b7c193fdd83 (diff)
parent810b3b5fcd2632ca9d54f939f9abb4ceaf33e8bc (diff)
Merge pull request #143745 from jwoudenberg/yubikey-agent-fixes
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/security/yubikey-agent.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/services/security/yubikey-agent.nix b/nixos/modules/services/security/yubikey-agent.nix
index 8a2f98d0412d1..8be2457e1e2f2 100644
--- a/nixos/modules/services/security/yubikey-agent.nix
+++ b/nixos/modules/services/security/yubikey-agent.nix
@@ -13,7 +13,7 @@ in
 {
   ###### interface
 
-  meta.maintainers = with maintainers; [ philandstuff rawkode ];
+  meta.maintainers = with maintainers; [ philandstuff rawkode jwoudenberg ];
 
   options = {
 
@@ -49,6 +49,12 @@ in
     # yubikey-agent package
     systemd.user.services.yubikey-agent = mkIf (pinentryFlavor != null) {
       path = [ pkgs.pinentry.${pinentryFlavor} ];
+      wantedBy = [
+        (if pinentryFlavor == "tty" || pinentryFlavor == "curses" then
+          "default.target"
+        else
+          "graphical-session.target")
+      ];
     };
 
     environment.extraInit = ''