forked from fediversity/fediversity
		
	Slight rework of the installer
This commit is contained in:
		
							parent
							
								
									271315747b
								
							
						
					
					
						commit
						9d04ce7c99
					
				
					 1 changed files with 20 additions and 20 deletions
				
			
		|  | @ -3,29 +3,30 @@ | |||
| 
 | ||||
|   WARNING: Running this installer will format the target disk! | ||||
| */ | ||||
| nixpkgs: machine: | ||||
|   let | ||||
|     installer = { config, pkgs, lib, ... }: | ||||
|       let | ||||
|         bootstrap = pkgs.writeShellApplication { | ||||
|           name = "bootstrap"; | ||||
|           runtimeInputs = with pkgs; [ nixos-install-tools ]; | ||||
|           text = '' | ||||
|             ${machine.config.system.build.diskoScript} | ||||
|             nixos-install --no-root-password --no-channel-copy --system ${machine.config.system.build.toplevel} \ | ||||
|               && poweroff | ||||
|           ''; | ||||
|         }; | ||||
|       in | ||||
| 
 | ||||
| { nixpkgs, ... }: | ||||
| machine: | ||||
| 
 | ||||
| let | ||||
|   installer = { config, pkgs, lib, ... }: | ||||
|     let | ||||
|       bootstrap = pkgs.writeShellApplication { | ||||
|         name = "bootstrap"; | ||||
|         runtimeInputs = with pkgs; [ nixos-install-tools ]; | ||||
|         text = '' | ||||
|           ${machine.config.system.build.diskoScript} | ||||
|           nixos-install --no-root-password --no-channel-copy --system ${machine.config.system.build.toplevel} \ | ||||
|             && poweroff | ||||
|         ''; | ||||
|       }; | ||||
|     in | ||||
|       { | ||||
|         imports = [ | ||||
|           "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" | ||||
|         ]; | ||||
|         nixpkgs.hostPlatform = "x86_64-linux"; | ||||
|         services.getty.autologinUser = lib.mkForce "root"; | ||||
|         programs.bash.loginShellInit = '' | ||||
|           ${nixpkgs.lib.getExe bootstrap} | ||||
|         ''; | ||||
|         programs.bash.loginShellInit = nixpkgs.lib.getExe bootstrap; | ||||
| 
 | ||||
|         isoImage = { | ||||
|           compressImage = false; | ||||
|  | @ -35,6 +36,5 @@ nixpkgs: machine: | |||
|           ## use `isoImage.isoName` in the tests. | ||||
|         }; | ||||
|       }; | ||||
|   in | ||||
|   (nixpkgs.lib.nixosSystem { modules =  [installer];}).config.system.build.isoImage | ||||
|   | ||||
| in | ||||
| (nixpkgs.lib.nixosSystem { modules = [installer]; }).config.system.build.isoImage | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Valentin Gagarin
							Valentin Gagarin