mirror of
				https://github.com/Stunkymonkey/nixos.git
				synced 2025-10-31 09:42:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			522 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			522 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| {
 | |
|   config,
 | |
|   lib,
 | |
|   pkgs,
 | |
|   ...
 | |
| }:
 | |
| let
 | |
|   cfg = config.my.hardware.yubikey;
 | |
| in
 | |
| {
 | |
|   options.my.hardware.yubikey = {
 | |
|     enable = lib.mkEnableOption "yubikey configuration";
 | |
|   };
 | |
| 
 | |
|   config = lib.mkIf cfg.enable {
 | |
|     services.udev.packages = [ pkgs.yubikey-personalization ];
 | |
|     programs = {
 | |
|       ssh.startAgent = false;
 | |
|       gnupg.agent = {
 | |
|         enable = true;
 | |
|         enableSSHSupport = true;
 | |
|       };
 | |
|     };
 | |
|     services.pcscd.enable = true;
 | |
| 
 | |
|     environment.systemPackages = with pkgs; [ yubikey-manager ];
 | |
|   };
 | |
| }
 | 
