19 lines
		
	
	
	
		
			632 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			632 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/sh
 | 
						|
 | 
						|
###############################################################################
 | 
						|
# This script symlinks the nix files to their respective directories in nixos #
 | 
						|
###############################################################################
 | 
						|
 | 
						|
HOMECONFIGPATH="${HOME}/.config/nixpkgs"
 | 
						|
NIXOSCONFIGPATH="/etc/nixos"
 | 
						|
 | 
						|
mkdir -p "${HOMECONFIGPATH}"
 | 
						|
for F in `find ./home -mindepth 1 -maxdepth 2`; do
 | 
						|
	ABS_F=`readlink -f "${F}"`
 | 
						|
	ln -s "$ABS_F" "${HOMECONFIGPATH}/`basename ${F}`"
 | 
						|
done
 | 
						|
 | 
						|
for F in `find ./nixos -mindepth 1 -maxdepth 1`; do
 | 
						|
	ABS_F=`readlink -f "${F}"`
 | 
						|
	sudo ln -s "$ABS_F" "${NIXOSCONFIGPATH}/`basename ${F}`"
 | 
						|
done
 |