[yubikey] Add touch-detector
This commit is contained in:
		
							parent
							
								
									6f5815b392
								
							
						
					
					
						commit
						da6d195afb
					
				
					 1 changed files with 22 additions and 5 deletions
				
			
		|  | @ -6,14 +6,31 @@ in { | ||||||
|   options.sisyphus.hardware.yubikey.enable = lib.mkEnableOption "YubiKey support"; |   options.sisyphus.hardware.yubikey.enable = lib.mkEnableOption "YubiKey support"; | ||||||
| 
 | 
 | ||||||
|   config = lib.mkIf cfg.enable { |   config = lib.mkIf cfg.enable { | ||||||
|     programs.gnupg.agent = { |     programs = { | ||||||
|       enable = true; |       gnupg.agent = { | ||||||
|       # TODO Necessary? |         enable = true; | ||||||
|       # enableSSHSupport = true; |         # TODO Necessary? | ||||||
|       # pinentryFlavor = "curses"; |         # enableSSHSupport = true; | ||||||
|  |         # pinentryFlavor = "curses"; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       # yubikey-touch-detector.enable = true; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     # Enable smart card reading |     # Enable smart card reading | ||||||
|     services.pcscd.enable = true; |     services.pcscd.enable = true; | ||||||
|  | 
 | ||||||
|  |     environment.systemPackages = with pkgs; [ | ||||||
|  |       yubikey-touch-detector | ||||||
|  |     ]; | ||||||
|  | 
 | ||||||
|  |     # Send a notification if the YubiKey is waiting for touch. | ||||||
|  |     systemd.user.services.yubikey-touch-detector = { | ||||||
|  |       enable = true; | ||||||
|  |       description = "Detects when your YubiKey is waiting for a touch"; | ||||||
|  |       path = with pkgs; [ yubikey-touch-detector ]; | ||||||
|  |       script = ''exec yubikey-touch-detector --notify''; | ||||||
|  |       environment.YUBIKEY_TOUCH_DETECTOR_LIBNOTIFY = "true"; | ||||||
|  |     }; | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue