Quickstart¶
1) Create a NixOS installer USB¶
- Download the NixOS ISO: https://nixos.org/download/#nixos-iso
- Use Ventoy (multi-ISO USB). This is what I use and recommend. Install Ventoy, copy the ISO to the USB, and boot from it.
- If you don't want Ventoy, use a USB flashing tool instead:
- Windows: Rufus or balenaEtcher
- macOS: balenaEtcher
- Linux: balenaEtcher
- Flash the ISO to a USB drive if you used a flashing tool (this erases the USB).
2) Boot from the USB¶
- Plug the USB into the target computer.
- Reboot and open the boot menu (usually F12, F10, or ESC).
- Pick the USB device and boot into the NixOS installer.
3) Install NixOS (basic install)¶
- Connect to the internet.
- Open the "Install NixOS" app from the desktop.
- Follow the installer steps.
- Reboot into the new system when the installer finishes.
4) Get this config¶
First, fork this repo on GitHub. Then open a terminal and run:
git clone https://github.com/<your-username>/nexusystem ~/nexusystem
5) Create your own host¶
- Copy the example host folder:
cp -r ~/nexusystem/hosts/example ~/nexusystem/hosts/<your-hostname>
- Set your hostname and options:
Open the file in a text editor (double-click in the file manager), or run:
xdg-open ~/nexusystem/hosts/<your-hostname>/variables.nix
- Copy your hardware configuration:
cp /etc/nixos/hardware-configuration.nix \
~/nexusystem/hosts/<your-hostname>/hardware-configuration.nix
- Register the new host in
flake.nix:
Open the file in a text editor, or run:
xdg-open ~/nexusystem/flake.nix
Add a block like:
<your-hostname> = nixpkgs.lib.nixosSystem {
modules = sharedModules ++ [ ./hosts/<your-hostname>/configuration.nix ];
};
Important: # CHANGEME comments mark things you must edit. Find them with:
rg "CHANGEME" ~/nexusystem
6) Apply the configuration (first time)¶
From the repo root:
cd ~/nexusystem
sudo nixos-rebuild switch --flake ~/nexusystem#<your-hostname>
7) Next rebuilds (after the config is applied)¶
Easiest way: open the command palette (SUPER) and select:
Nix helper -> Rebuild
Terminal option:
cd ~/nexusystem
git add .
nh os switch -H <your-hostname> ~/nexusystem
Tip: if you add or rename files, always run git add . so Nix can see them.
8) Reboot¶
reboot
Next: see Usage tips for daily-use tips.