mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	add NixOS to quickget
add NixOS to quickget add NixOS to quickget
This commit is contained in:
		
							parent
							
								
									f1114974c0
								
							
						
					
					
						commit
						8602ba8e85
					
				
					 1 changed files with 32 additions and 0 deletions
				
			
		
							
								
								
									
										32
									
								
								quickget
									
										
									
									
									
								
							
							
						
						
									
										32
									
								
								quickget
									
										
									
									
									
								
							|  | @ -40,6 +40,9 @@ function pretty_name() { | ||||||
|     linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; |     linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";; | ||||||
|     linuxmint-mate)     PRETTY_NAME="Linux Mint MATE";; |     linuxmint-mate)     PRETTY_NAME="Linux Mint MATE";; | ||||||
|     linuxmint-xfce)     PRETTY_NAME="Linux Mint XFCE";; |     linuxmint-xfce)     PRETTY_NAME="Linux Mint XFCE";; | ||||||
|  |     nisos-gnome)        PRETTY_NAME="NixOS Gnome";; | ||||||
|  |     nixos-plasma5)      PRETTY_NAME="NixOS KDE";; | ||||||
|  |     nixos-minimal)      PRETTY_NAME="Nixos Minimal";; | ||||||
|     macos)              PRETTY_NAME="macOS";; |     macos)              PRETTY_NAME="macOS";; | ||||||
|     openbsd)            PRETTY_NAME="OpenBSD";; |     openbsd)            PRETTY_NAME="OpenBSD";; | ||||||
|     opensuse)           PRETTY_NAME="openSUSE";; |     opensuse)           PRETTY_NAME="openSUSE";; | ||||||
|  | @ -116,6 +119,9 @@ function os_support() { | ||||||
|     linuxmint-cinnamon \ |     linuxmint-cinnamon \ | ||||||
|     linuxmint-mate \ |     linuxmint-mate \ | ||||||
|     linuxmint-xfce \ |     linuxmint-xfce \ | ||||||
|  |     nixos-gnome \ | ||||||
|  |     nixos-plasma5 \ | ||||||
|  |     nixos-minimal \ | ||||||
|     lubuntu \ |     lubuntu \ | ||||||
|     macos \ |     macos \ | ||||||
|     openbsd \ |     openbsd \ | ||||||
|  | @ -154,6 +160,10 @@ function releases_linuxmint(){ | ||||||
|     echo 20.2 |     echo 20.2 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | function releases_nixos(){ | ||||||
|  |     echo 21.05 | ||||||
|  | } | ||||||
|  | 
 | ||||||
| function releases_openbsd(){ | function releases_openbsd(){ | ||||||
|     echo 7.0 |     echo 7.0 | ||||||
| } | } | ||||||
|  | @ -460,6 +470,7 @@ function web_get() { | ||||||
|     local DIR="${2}" |     local DIR="${2}" | ||||||
|     local FILE="" |     local FILE="" | ||||||
|     local URL="${1}" |     local URL="${1}" | ||||||
|  | 
 | ||||||
|     if [ -n "${3}" ]; then |     if [ -n "${3}" ]; then | ||||||
|         FILE="${3}" |         FILE="${3}" | ||||||
|     else |     else | ||||||
|  | @ -533,6 +544,9 @@ function make_vm_config() { | ||||||
|     elif [[ "${OS}" == *"linuxmint"* ]]; then |     elif [[ "${OS}" == *"linuxmint"* ]]; then | ||||||
|         GUEST="linux" |         GUEST="linux" | ||||||
|         IMAGE_TYPE="iso" |         IMAGE_TYPE="iso" | ||||||
|  |     elif [[ "${OS}" == *"nixos"* ]]; then | ||||||
|  |         GUEST="linux" | ||||||
|  |         IMAGE_TYPE="iso" | ||||||
|     elif [ "${OS}" == "openbsd" ]; then |     elif [ "${OS}" == "openbsd" ]; then | ||||||
|         GUEST="openbsd" |         GUEST="openbsd" | ||||||
|         IMAGE_TYPE="iso" |         IMAGE_TYPE="iso" | ||||||
|  | @ -668,7 +682,21 @@ function get_linuxmint() { | ||||||
|     check_hash "${ISO}" "${HASH}" |     check_hash "${ISO}" "${HASH}" | ||||||
|     make_vm_config "${ISO}" |     make_vm_config "${ISO}" | ||||||
| } | } | ||||||
|  | function get_nixos() { | ||||||
|  |     local FLAVOR="" | ||||||
|  |     local HASH="" | ||||||
|  |     local ISO="" | ||||||
|  |     local URL="" | ||||||
| 
 | 
 | ||||||
|  |     validate_release "releases_nixos" | ||||||
|  |     FLAVOR=$(echo "${OS}" | cut -d'-' -f2) | ||||||
|  |     ISO="latest-nixos-${FLAVOR}-x86_64-linux.iso" | ||||||
|  |     URL="https://channels.nixos.org/nixos-${RELEASE}/${ISO}" | ||||||
|  |     HASH=$(wget -q -O- "https://channels.nixos.org/nixos-${RELEASE}/${ISO}.sha256" |  cut -d' ' -f1) | ||||||
|  |     web_get "${URL}" "${VM_PATH}" | ||||||
|  |     check_hash "${ISO}" "${HASH}" | ||||||
|  |     make_vm_config "${ISO}" | ||||||
|  | } | ||||||
| function get_openbsd() { | function get_openbsd() { | ||||||
|     local HASH="" |     local HASH="" | ||||||
|     local ISO="" |     local ISO="" | ||||||
|  | @ -935,6 +963,8 @@ if [ -n "${2}" ]; then | ||||||
|         get_kali |         get_kali | ||||||
|     elif [[ "${OS}" == *"linuxmint"* ]]; then |     elif [[ "${OS}" == *"linuxmint"* ]]; then | ||||||
|         get_linuxmint |         get_linuxmint | ||||||
|  |     elif [[ "${OS}" == *"nixos"* ]]; then | ||||||
|  |         get_nixos | ||||||
|     elif [ "${OS}" == "openbsd" ]; then |     elif [ "${OS}" == "openbsd" ]; then | ||||||
|         get_openbsd |         get_openbsd | ||||||
|     elif [ "${OS}" == "opensuse" ]; then |     elif [ "${OS}" == "opensuse" ]; then | ||||||
|  | @ -988,6 +1018,8 @@ else | ||||||
|         releases_kali |         releases_kali | ||||||
|     elif [[ "${OS}" == *"linuxmint"* ]]; then |     elif [[ "${OS}" == *"linuxmint"* ]]; then | ||||||
|         releases_linuxmint |         releases_linuxmint | ||||||
|  |     elif [[ "${OS}" == *"nixos"* ]]; then  | ||||||
|  |         releases_nixos | ||||||
|     elif [ "${OS}" == "opensuse" ]; then |     elif [ "${OS}" == "opensuse" ]; then | ||||||
|         releases_opensuse |         releases_opensuse | ||||||
|     elif [ "${OS}" == "openbsd" ]; then |     elif [ "${OS}" == "openbsd" ]; then | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue