diff --git a/nixos-infect b/nixos-infect index fcef22b..798ad38 100755 --- a/nixos-infect +++ b/nixos-infect @@ -1,9 +1,14 @@ #! /usr/bin/env bash -# TODO config grubdev "nodev", then run installgrub again after. this way, grub has a chance of booting even if the install-gurb fails -# nixos-infect is so named because there's a good chance the system will get -# sick if anything goes wrong, and possibly die, requiring reprovisioning. -# Use with caution. +# Use Droplet image: +# +# Ubuntu 16.04 (x64 or x32) +# +# YMMV with any other hoster + image combination. + +# nixos-infect is so named because of the high likelihood of rendering a system +# inoperable. Use with caution and preferably only on newly-provisioned +# systems. # # WARNING NB This script wipes out the targeted host's root filesystem when it # runs to completion. Any errors halt execution. set -x is used to help debug, @@ -16,16 +21,7 @@ # - Deploy a Debian 8.3 x64 droplet (enable ipv6; add your ssh key) # - cat customConfig.optional nixos-infect | ssh root@targethost bash # -# This was last tested with the DigitalOcean Debian 8.3 x64 image. Different -# versions and archs (namely i386) should work as well, but then, there's not -# much point in selecting something different if you intend to wipe out the fs, -# as this script does. Some Ubuntu droplets have gpt partition tables but no -# bios partition for grub allocated. It's way too much effort to try to get -# NixOS to install grub using blocklists, so just avoid improperly configured -# images like those. -# -# You may need to make minor modifications to use in other templates, but -# basically all that will ever need tweaking are already inlined in this file: +# Potential tweaks: # /etc/nixos/{,hardware-}configuration.nix : rudimentary mostly static config # /etc/nixos/networking.nix, networking settings determined at runtime # tweak if no ipv6, different number of adapters, etc. @@ -42,7 +38,6 @@ set -ex nixos_channel=nixos-unstable -#nixos_channel=nixos-16.03 makeConf() { # NB <<"EOF" quotes / $ ` in heredocs, <