15 lines
		
	
	
		
			353 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			353 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
echo "You're about to switch your home-manager configuration as '$USER'"
 | 
						|
read -p "Continue (y/n)?" conf
 | 
						|
 | 
						|
if [[ ${conf,,} =~ ^(y|yes)$ ]]; then
 | 
						|
  nix build .\#hm-configs.$USER.activationPackage -o hm-result &&
 | 
						|
  ./hm-result/activate
 | 
						|
  unlink hm-result
 | 
						|
else
 | 
						|
  echo "If this is not you, then log into your profile first!"
 | 
						|
  exit 1
 | 
						|
fi
 | 
						|
 |