- Install NixOS using the official ISO
- Generate an SSH key with
ssh-keygen
and save the public key in github - Start a nix shell with git in it
nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#git
- Clone this repo
git clone [email protected]:snyssen/nixos-config.git && cd nixos-config
- Generate a new hardware-configuration.nix file for your host and add it to staged changes
nixos-generate-config --dir hosts/[host]/
git add hosts/[host]/hardware-configuration.nix
- Switch to the host configuration
sudo nixos-rebuild switch --flake .#[host]
Tip
You can use the Nix Determinate installter to install nix on any Linux distro
nix shell nixpkgs#git-crypt --command git-crypt unlock
sudo nixos-rebuild switch --flake .#gaming