Automatically install and configure NixOS.
Review all files and adjust the configurations to suit your needs. At a minimum, you’ll need to change the following:
-
Users:
- Replace
khuedoan
with your username. - Replace my SSH public keys with yours.
- Replace
khuedoan/dotfiles
with your dotfiles repository, or usehome-manager
to manage all dotfiles.
- Replace
-
Hosts:
- Replace my hostnames with yours.
- Adjust hardware configurations to match your system.
- Download the latest NixOS live CD from here.
- Create a bootable USB drive:
sudo dd bs=4M if=/path/to/nixos.iso of=/dev/sda conv=fsync oflag=direct status=progress
- Boot from the USB drive.
- Install NixOS from the live CD:
nix-shell -p git gnumake neovim
git clone https://github.com/khuedoan/nixos-setup
cd nixos-setup
# Remember to replace the placeholders
make install host=HOSTNAME disk=/dev/DISK
After installation, clone your repository again and apply changes to the configuration by running:
make
If hardware changes occur, update the hardware configuration using the command
in the install
target in ./Makefile
.
To test updated configurations without applying them to a running machine, create a VM using:
make test