My dotfiles for nixos. I use home-manager and flakes to manage my configuration.
- Download minimal nixos iso from here and boot into it.
- Make your partitions and mount them into
/mnt
and/mnt/boot
and/mnt/boot/efi
if you are using UEFI. - To generate your configuration file, run:
nixos-generate-config --root /mnt
- Remove the
/mnt/etc/nixos/configuration.nix
file.
rm /mnt/etc/nixos/configuration.nix
- Make sure you have an internet connection by running:
ping -c 3 google.com
- If you don't have an internet connection, run the following command to connect to a wifi network:
wpa_supplicant -B -i <interface> -c <(wpa_passphrase <ssid> <password>)
- Run
nix-shell -p git
to install git temporarily. - Enter to the directory
/mnt/etc/nixos/
by runningcd /mnt/etc/nixos/
. - Clone this repository
git clone https://github.com/chere3/dots.git . --recurse-submodules
into/mnt/etc/nixos/
. - Run
exit
and thennix-shell
to enter a nix shell. - Replace the
/mnt/etc/nixos/nixos/hosts/<hostname>/hardware-configuration.nix
with the one generated bynixos-generate-config --root /mnt
located at/mnt/etc/nixos/hardware-configuration.nix
. - To install nixos, run:
nixos-install --flake /mnt/etc/nixos#<hostname>
- Reboot and enjoy your new system.
- Clone the dots repository into your home directory by running
git clone https://github.com/chere3/dots.git ~/.dots --recurse-submodules
and then rundoas nh home switch -R
to switch home-manager to the new configuration. - Enjoy your new system.