mirror of
https://github.com/elitak/nixos-infect.git
synced 2024-12-22 16:18:29 +03:00
notes
This commit is contained in:
parent
8de6d61e15
commit
0ff9464dc7
1 changed files with 8 additions and 7 deletions
15
nixos-infect
15
nixos-infect
|
@ -15,13 +15,13 @@
|
||||||
# - Deploy a Debian 8.3 x64 droplet (enable ipv6; add your ssh key)
|
# - Deploy a Debian 8.3 x64 droplet (enable ipv6; add your ssh key)
|
||||||
# - cat customConfig.optional nixos-infect | ssh root@targethost bash
|
# - cat customConfig.optional nixos-infect | ssh root@targethost bash
|
||||||
#
|
#
|
||||||
# This was last tested with the DigitalOcean Debian 8.3 x64 and Ubuntu 15.10
|
# This was last tested with the DigitalOcean Debian 8.3 x64 image. Different
|
||||||
# x64 images. Different versions and archs (namely i386) should work as well,
|
# versions and archs (namely i386) should work as well, but then, there's not
|
||||||
# but then, there's not much point in selecting something different if you
|
# much point in selecting something different if you intend to wipe out the fs,
|
||||||
# intend to wipe out the fs, as this script does. Some Ubuntu droplets have gpt
|
# as this script does. Some Ubuntu droplets have gpt partition tables but no
|
||||||
# partition tables but only a single ext4 root partition. It's way too much
|
# bios partition for grub allocated. It's way too much effort to try to get
|
||||||
# effort to try to get nixos to install grub using blocklists, so just avoid
|
# NixOS to install grub using blocklists, so just avoid improperly configured
|
||||||
# improperly configured images like those.
|
# images like those.
|
||||||
#
|
#
|
||||||
# You may need to make minor modifications to use in other templates, but
|
# 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:
|
# basically all that will ever need tweaking are already inlined in this file:
|
||||||
|
@ -170,6 +170,7 @@ nixos-install --root $newRootMount
|
||||||
mount -B / $oldRootMount
|
mount -B / $oldRootMount
|
||||||
|
|
||||||
# Everything up to this point is revertible; this is the truly destructive step.
|
# Everything up to this point is revertible; this is the truly destructive step.
|
||||||
|
# GOTCHAs when running manually: very easy to forget slash at end of source, or use / as dest instead of bindmounted root, both of which are catastrophic...
|
||||||
rsync -a --delete --exclude=$(dirname $newRootMount) $newRootMount/ $oldRootMount
|
rsync -a --delete --exclude=$(dirname $newRootMount) $newRootMount/ $oldRootMount
|
||||||
|
|
||||||
# Restore access to commands
|
# Restore access to commands
|
||||||
|
|
Loading…
Reference in a new issue