18 Machine Deployment
Michael Petersen edited this page 2026-06-02 11:40:16 +10:00

Obtaining NixOS

  1. Download NixOS from https://nixos.org/download/#nixos-iso
    • Historically I use the latest NixOS Minimal ISO
  2. Write the ISO Image to a USB Drive
    sudo dd bs=4M conv=fsync oflag=direct status=progress if=<path-to-image> of=/dev/sdX
    

Installing NixOS

  1. Boot from the NixOS Drive on the target machine
  2. Ensure you have an internet connection
    • Wireless as of NixOS 26.05 can be setup using nmtui
  3. Clone this repo. git clone https://git.michaelpetersen.io/Kruziikrel13/NixOS.git
  4. Partition the disk using provided script. sudo ./partition-disk nvme0n1
  5. If installing on a totally new machine see Installing on New Machines otherwise skip to step 6.
  6. Install the flake using provided script sudo ./install-flake aridhol

Disk Encryption

Placeholder

New Machines

Totally new machines need, at minimum a viable hardware configuration. To generate this, partitioning and encryption should be already completed.

Instead of running the install script a basic machine config should first be generated.

nixos-generate-config --show-hardware-config --root /mnt > hardware-configuration.nix

Once generated, translate the hardware configuration across to your new host file. For structure and format of a host file, refer to existing configurations.

Once the new host file (with at least the hardware config) has been created. Proceed to step 6 of Installing NixOS

Dual Booting with Windows

Placeholder