Bootstrap NixOS images for servers, PCs, and SBCs. The provided images use a preset disk partition and will automatically expand to the full size after startup. The system has a passwordless root account that can be accessed locally or remotely, facilitating the deployment of your own NixOS configuration.
Note: The bootstrap system disables the firewall and allows root login via SSH without a password. Therefore, leaving the system unchanged on the public internet is unsafe and dangerous. You should set your own password or SSH key as soon as possible.
- Pre-configured NixOS bootstrap images for different environments (servers, PCs, SBCs)
- Automatic disk resizing to fit the full available space after first boot
- Passwordless root access for easy configuration deployment
- Example configurations provided for Colmena deployment
- Download the appropriate NixOS image from the releases page.
- Flash the image to your storage media (e.g., using
dd
, Etcher, etc.). - Boot the device — the root partition will resize automatically.
For cloud servers, you can use the bin456789/reinstall script to streamline the installation process. This script reboots the server into a minimal Alpine Linux environment that runs entirely in memory, and then uses dd
to overwrite the disk with the NixOS image.
Run the following one-liner to reinstall the NixOS image on your cloud server:
## x86_64-linux
bash <(curl -L https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh) dd --password 123@@@ --img=https://github.com/qbisi/nixos-images/releases/download/20241101/nixos-x86_64-generic.raw.xz && reboot
## aarch64
bash <(curl -L https://raw.githubusercontent.com/bin456789/reinstall/main/reinstall.sh) dd --password 123@@@ --img=https://github.com/qbisi/nixos-images/releases/download/20241101/nixos-aarch64-uefi.raw.xz && reboot
See Hosts readme.
You can use the Colmena tool to deploy your settings. Typical examples are provided in the repository: github:/qbisi/nixos-config.
For advanced users looking to build a custom NixOS image from this Nix-based flake source, follow the steps below:
Ensure you have the following installed:
-
Nix: Follow the installation instructions at nixos.org.
-
Flakes Support: Enable flakes in your Nix configuration by adding the following line to
/etc/nix/nix.conf
:experimental-features = nix-command flakes
Use the following command to build your desired NixOS image. Replace ${device} with the appropriate values (e.g., nixos-x86_64-generic-btrfs for device type):
nix build github:qbisi/nixos-images#images.${device}
Once the build is complete, the resulting image will be located in the result directory:
ls result/
You should see the generated NixOS image file.