# Installation Guide This guide covers the standard process for installing this NixOS configuration on any host. ## 1. Boot & Partitioning Boot the **NixOS Unstable ISO**. ### Disk Layout Consult the machine-specific README for the recommended partition and subvolume layout: * [Electra Setup Specifics](hosts/electra/README.md) * [Lena Setup Specifics](hosts/lena/README.md) ### Mounting Example (Assuming Btrfs) ```bash # Mount your root to /mnt and create subvolumes as needed # Ensure your EFI partition is mounted at /mnt/boot ``` --- ## 2. Installation Steps ### Step 1: Clone the Repository Clone this repo into the installation environment so the installer can access the flake. ```bash nix-shell -p git --run "git clone https://git.nimmog.uk/nimmo/nixos-config.git /mnt/etc/nixos" ``` ### Step 2: Generate Hardware Configuration NixOS needs to know about your physical drive IDs and modules. ```bash nixos-generate-config --root /mnt ``` ### Step 3: Organize Configuration Move the generated file into the host-specific directory. ```bash # Replace HOSTNAME with electra or lena mv /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/hosts/HOSTNAME/hardware-configuration.nix ``` ### Step 4: Execute Install ```bash # Replace HOSTNAME with electra or lena nixos-install --flake /mnt/etc/nixos#HOSTNAME ``` ### Step 5: Finalize Set your user password before rebooting. ```bash nixos-enter --passwd nimmo reboot ``` --- ## 3. Post-Installation Once logged into your new system, move the configuration to its permanent home for easier management. ```bash mkdir -p ~/Scripts sudo mv /etc/nixos ~/Scripts/nixos-config sudo chown -R nimmo:users ~/Scripts/nixos-config ``` ### Applying Changes From now on, any changes made to the files in `~/Scripts/nixos-config` can be applied with: ```bash sudo nixos-rebuild switch --flake .#HOSTNAME ```