Refactor env local files
This commit is contained in:
		
							parent
							
								
									939945fcba
								
							
						
					
					
						commit
						ce4bd6eeed
					
				
					 6 changed files with 39 additions and 18 deletions
				
			
		
							
								
								
									
										16
									
								
								.config/env.d/80-conditionals
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										16
									
								
								.config/env.d/80-conditionals
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,16 @@
 | 
			
		|||
#!/usr/bin/env sh
 | 
			
		||||
 | 
			
		||||
# shellcheck disable=2089
 | 
			
		||||
[ -x "$(command -v bat)" ] && export MANPAGER="sh -c 'col -bx | bat -l man -p'"
 | 
			
		||||
# shellcheck disable=2090
 | 
			
		||||
[ -x "$(command -v moar)" ] && export MANPAGER="moar"
 | 
			
		||||
[ -x "$(command -v moar)" ] && export PAGER="moar"
 | 
			
		||||
 | 
			
		||||
[ -x "$(command -v nvim)" ] && export EDITOR="$(which nvim)"
 | 
			
		||||
 | 
			
		||||
[ -x "$(command -v gpgconf)" ] && export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
 | 
			
		||||
 | 
			
		||||
[ -x "$(command -v home-manager)" ] \
 | 
			
		||||
	&& [ -x "$(command -v nix)" ] \
 | 
			
		||||
	&& [ -f "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" ] \
 | 
			
		||||
	&& . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue