15 lines
		
	
	
	
		
			528 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			528 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { self, ... }: let 
 | |
|   rev = builtins.replaceStrings ["-dirty"] ["*"] (toString (self.shortRev or self.dirtyShortRev or self.lastModified or "unknown"));
 | |
| in {
 | |
|   programs.bash = {
 | |
|     enable = true;
 | |
|     shellAliases = {
 | |
|       ssh-with-yubikey = "ssh_with_yubikey";
 | |
|     };
 | |
|     bashrcExtra = ''
 | |
|       ssh_with_yubikey () { AGENT_SOCKET=$(ssh $@ gpgconf --list-dirs agent-socket) && ssh -A -R "$AGENT_SOCKET:$(gpgconf --list-dirs agent-socket)" -o "StreamLocalBindUnlink=yes" $@; }
 | |
| 
 | |
|       export SYSTEM_GIT_REV=${rev}
 | |
|     '';
 | |
|   };
 | |
| }
 |