mirror of
				https://github.com/shokinn/.files.git
				synced 2025-11-04 04:28:11 +00:00 
			
		
		
		
	Add hyper-v route helper script
This commit is contained in:
		
							parent
							
								
									bde464034c
								
							
						
					
					
						commit
						066af88bf1
					
				
					 2 changed files with 24 additions and 0 deletions
				
			
		
							
								
								
									
										12
									
								
								config.yaml
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								config.yaml
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -18,6 +18,9 @@ actions:
 | 
			
		|||
    [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes ]] && mkdir -p ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes || echo "do nothing" >/dev/null
 | 
			
		||||
    [[ ! -d ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel10k ]] && git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${{ZSH_CUSTOM:-${{HOME}}/.oh-my-zsh/custom}}/themes/powerlevel10k || echo "do nothing" >/dev/null
 | 
			
		||||
dotfiles:
 | 
			
		||||
  f_addhypervroute:
 | 
			
		||||
    dst: ~/.bin/addhypervroute
 | 
			
		||||
    src: bin/addhypervroute
 | 
			
		||||
  d_bspwm:
 | 
			
		||||
    dst: ~/.config/bspwm
 | 
			
		||||
    src: config/bspwm
 | 
			
		||||
| 
						 | 
				
			
			@ -128,6 +131,8 @@ profiles:
 | 
			
		|||
    - f_c3check
 | 
			
		||||
    - f_zprofile
 | 
			
		||||
    - f_start_systemd_shell.sh
 | 
			
		||||
    - f_dotdrop.sh
 | 
			
		||||
    - f_addhypervroute
 | 
			
		||||
  AINCRAD-wsl:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - d_fonts
 | 
			
		||||
| 
						 | 
				
			
			@ -147,6 +152,8 @@ profiles:
 | 
			
		|||
    - f_c3check
 | 
			
		||||
    - f_zprofile
 | 
			
		||||
    - f_start_systemd_shell.sh
 | 
			
		||||
    - f_dotdrop.sh
 | 
			
		||||
    - f_addhypervroute
 | 
			
		||||
  yoetunheimr:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - d_bspwm
 | 
			
		||||
| 
						 | 
				
			
			@ -173,6 +180,8 @@ profiles:
 | 
			
		|||
    - f_c3kdenlive
 | 
			
		||||
    - f_c3mpv
 | 
			
		||||
    - f_c3check
 | 
			
		||||
    - f_dotdrop.sh
 | 
			
		||||
    - f_addhypervroute
 | 
			
		||||
  YOETUNHEIMR-wsl:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - d_fonts
 | 
			
		||||
| 
						 | 
				
			
			@ -192,6 +201,8 @@ profiles:
 | 
			
		|||
    - f_c3check
 | 
			
		||||
    - f_zprofile
 | 
			
		||||
    - f_start_systemd_shell.sh
 | 
			
		||||
    - f_dotdrop.sh
 | 
			
		||||
    - f_addhypervroute
 | 
			
		||||
  ymir:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - f_zshrc
 | 
			
		||||
| 
						 | 
				
			
			@ -209,6 +220,7 @@ profiles:
 | 
			
		|||
    - f_c3mpv
 | 
			
		||||
    - f_c3check
 | 
			
		||||
    - f_dotdrop.sh
 | 
			
		||||
    - f_addhypervroute
 | 
			
		||||
  workspace:
 | 
			
		||||
    dotfiles:
 | 
			
		||||
    - d_fonts
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										12
									
								
								dotfiles/bin/addhypervroute
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								dotfiles/bin/addhypervroute
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,12 @@
 | 
			
		|||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# {{@@ header() @@}}
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
HYPER_V_SWITCH_ADDRESS=$(powershell.exe 'Get-NetIPAddress -ifAlias "vEthernet (Default Switch)" -AddressFamily IPv4 | Select -ExpandProperty IPAddress')
 | 
			
		||||
HYPER_V_SWITCH_ADDRESS="${HYPER_V_SWITCH_ADDRESS%.*}.0"
 | 
			
		||||
HYPER_V_SWITCH_PREFIX_LENGTH=$(echo "$(powershell.exe 'Get-NetIPAddress -ifAlias "vEthernet (Default Switch)" -AddressFamily IPv4 | Select -ExpandProperty PrefixLength')" | tr -d '\r')
 | 
			
		||||
WSL_SWITCH_ADDRESS=$( echo "$(powershell.exe 'Get-NetIPAddress -ifAlias "vEthernet (WSL)" -AddressFamily IPv4 | Select -ExpandProperty IPAddress')" | tr -d '\r')
 | 
			
		||||
 | 
			
		||||
sudo ip r add ${HYPER_V_SWITCH_ADDRESS}/${HYPER_V_SWITCH_PREFIX_LENGTH} via ${WSL_SWITCH_ADDRESS}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue