Fully locked out of system and can't reinstall

Recently I got a new 2TB drive to swap out an old 1TB drive. I forgot to rebuild my configs before rebooting and got kicked into emergency mode.

I tried to rebuild and got told that my flake couldn’t fetch nixpkgs. I tried to connect to the start wpa_supplicant which just paused for a minute and asks me to relog. I tried setting the WiFi device (which is built into my motherboard) to up and found out it can’t detect my card. I searched for WiFi drivers and found the the dri er was indeed loaded.

Eventually I gave up and loaded the nixos installer (plasma at first) onto my Ventoy USB drive and tried to reinstall. Plasma wouldn’t boot so I tried minimal in which I couldn’t connect to WiFi so I switched to gnome where I’m running into the same issue. I tried using USB Ethernet which seems to flicker on and off. I got about half way through the installer before it failed due to not being able to download packages.

I’m at a complete loss of what to do and any help would be appreciated.

Config: GitHub - AdamDunmore/LinuxConfigs

Just to keep things simple and maximize chances of a successful outcome, what I would do in such a situation is not try to be clever, and just take the simplest option:

  1. Ensure the disks with your data on it isn’t encrypted
  2. Boot into a live disk
  3. Backup any relevant data you wish to keep to some other disk, possibly a USB disk or a NAS
  4. Nuke the installation by formatting the disk that has your data
  5. Reboot into the nixos installer you already have
  6. Reinstall using your backed up system config

Now if your drive is indeed encrypted, things get a little tricky, in that the disk will have to be mounted in another host (as non-boot disk) first so you can backup your data.

Has it downloaded any packages? (And how the installer handles that failure?)

Do not press OK, open terminal, run mount — is your target drive mounted under /mnt with /mnt/boot also mounted etc.?

(The idea is nixos-install being re-startable downloading a bit more of packages every time, until eventually it can succeed)

What have you tried? Did you follow these instructions?