1.8 KiB
1.8 KiB
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:
Mounting Example (Assuming Btrfs)
# 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.
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.
nixos-generate-config --root /mnt
Step 3: Organize Configuration
Move the generated file into the host-specific directory.
# 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
# Replace HOSTNAME with electra or lena
nixos-install --flake /mnt/etc/nixos#HOSTNAME
Step 5: Finalize
Set your user password before rebooting.
nixos-enter --passwd nimmo
reboot
3. Post-Installation
Once logged into your new system, move the configuration to its permanent home for easier management.
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:
sudo nixos-rebuild switch --flake .#HOSTNAME