Skip to content

Latest commit

 

History

History
67 lines (45 loc) · 1.71 KB

README.md

File metadata and controls

67 lines (45 loc) · 1.71 KB

NixOS Kexec Installer Script

Bash script to download and install NixOS using kexec NixOS images.

Features

  • Configurable installation source, version tag, architecture and interactivity
  • Automatic system architecture detection
  • Configuration via environment files
  • Generating a download URL
  • Booting with kexec

Usage

Run pre-built script

Run the following snippet with root priviliges on the machine you wish to install nixos to.

bash <(curl -sSLf https://github.com/moritztim/nixos-kexec-installer/releases/latest/download/nixos-kexec.sh) --install

Run

  1. Generate an installer URL
./run.sh
  1. Install NixOS (requires root):
sudo ./run.sh --install

Build

To build a standalone script, run:

./build.sh

Configuration

The script uses two configuration files:

  • default.env: Default configuration
  • custom.env: Optional custom configuration that overrides the defaults set in default.env

Options

The configuration options are documented in the default configuration file.

Requirements

Base requirements

  • Bash shell
  • curl

Additional requirements for installation

  • Root privileges
  • tar

Best practices

  • Backup important data before installation
  • Review the URL before proceeding. To do this, run the script without the --install flag once and if you're happy, run it again, with the same configuration, and this time with the flag.

This documentation was created with non-creative assistance from Anthropic's Claude 3.5 Sonnet.