First, execute the following steps:
- Download NixOS ISO from the official download page
- Flash downloaded ISO on a USB stick (using
dd
for example) - Boot USB stick and execute the following commands:
# Follow NixOS pre-installation steps manual (everything except nixos-install)
# https://nixos.org/manual/nixos/stable/
# Update channels & install git
nix-channel --update
...
nix-env -i git
# Clone this repository
git clone https://github.com/negrel/dotfiles
# Generate configuration.nix and hardware-configuration.nix
cd dotfiles
nixos-generate-config --root .
# Overwrite hardware-configuration of one of the host
host="<host>"
mv etc/nixos/hardware-configuration.nix "hosts/$host/"
# Add bootloader entry in hardware-configuration
# NOTE: NixOS place bootloader configuration in configuration.nix by default.
nano "hosts/$host/hardware-configuration.nix"
# Install
nixos-install --flake ".#$host"
...
Reboot and that's it, your system is live.
Please give a ⭐ if this project helped you!
MIT © Alexandre Negrel