A script to install NixOS over an existing OS on cloud VPS providers like DigitalOcean, Hetzner, and Vultr.
NixOS-Infect is a Bash script that installs NixOS by overwriting the existing operating system on a cloud virtual private server (VPS). It solves the problem of cloud providers not offering NixOS images by allowing users to convert a freshly deployed Ubuntu, Debian, or other Linux instance into a NixOS system. The script automates partitioning, Nix installation, and bootloader configuration, targeting specific hosting environments.
DevOps engineers, system administrators, and NixOS enthusiasts who deploy servers on cloud VPS providers and want to run NixOS where it is not natively supported. It is best used on newly provisioned systems due to its destructive nature.
Developers choose NixOS-Infect because it provides a simple, automated way to get NixOS running on major cloud platforms without manual installation steps. Its unique selling point is broad provider compatibility and integration with cloud-init for hands-off provisioning.
[GPLv3+] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Tested on over 20 providers including DigitalOcean, Hetzner, and Vultr, with specific cloud-init integration for automated deployment, as detailed in the README.
Executable via a single curl command, handling partitioning, Nix installation, and bootloader setup without manual intervention, per the usage instructions.
Creates basic NixOS configuration files and allows importing custom Nix expressions through the NIXOS_IMPORT environment variable, enabling quick customization.
Halts on errors to prevent inconsistent states, though the README cautions that manual recovery may still be necessary if issues arise.
Wipes the root filesystem and can render the system inoperable if the script fails, requiring expert intervention, as warned in the README's disclaimer.
For hosts like OVH and Contabo, manual adjustments such as unmounting /tmp or changing hostnames are needed, adding complexity and potential for error.
Fails on certain distributions like CentOS 6.9, CoreOS, and Ubuntu 22.10, limiting its universality and requiring users to verify compatibility.
Admitted as a interim tool until nixos-assimilate is complete, implying potential lack of long-term maintenance and future obsolescence.