Install NixOS on Hetzner Online: Difference between revisions

imported>Mic92
No edit summary
imported>Ryantm
No edit summary
Line 87: Line 87:
# Create a user, because the nix installer
# Create a user, because the nix installer
useradd foo
useradd foo
mkdir /home/foo
mkdir /nix
mkdir /nix
chown foo /nix
chown foo /nix
su foo
su - foo
cd
bash


# Install Nix
# Install Nix
Line 111: Line 112:
# Generate the kexec script
# Generate the kexec script
nixos-generate -o ./result  -f kexec-bundle -c ./config.nix
nixos-generate -o ./result  -f kexec-bundle -c ./config.nix
# Switch back to root
exit


# Switch to the new system
# Switch to the new system
./result
/home/foo/result
</syntaxHighlight>
</syntaxHighlight>