- Boot a new VM using the nixos live CD with root password set to "root"
- Check the ip number of the VM:
ifconfig - Update the Makefile with the ip and then run
make bootstrapin the host- Sometimes the disk partitions get a
pprefix, like fornvme0n1so you need to addp<number>as suffix
- Sometimes the disk partitions get a
- run
make install - The previous step will reboot into the live CD again, remove the media, and reboot the VM.
- ssh to the VM
ssh root@<ip> mv /etc/nixos/dotfiles /home/antti/dotfiles && chown antti:users -R /home/antti/dotfiles- Change remote
origintogit@github.com:anttih/dotfiles.git rm /etc/nixos/configuration.nix- Set password for
anttiwithsudo passwd antti - scp the private and public key to the machine
ssh-add ~/.ssh/<key>
$ sudo nixos-rebuild switch --flake .#<host>