Hi!
I run NixOS on a small SSD, and have a partition on my external HDD that I used to use for storing media (/dev/sda5). I added this in my /etc/nixos/configuration.nix:
(I was messing around with flakes and I had accidentally deleted my /etc/nixos/hardware-configuration.nix. In a panic, I ran nixos-generate-config again, which made a new hardware-configuration.nix containing the already mounted /mnt/Storage on my system. Thus when rebuilding my configuration some error may have occurred - I have no idea how this worked/came about.)
So, the solution is to edit /etc/nixos/hardware-configuration.nix and to remove the lines:
- fileSystems."/mnt/Storage" = {
- # some options here I don't remember (HARDWARE-CONFIGURATION.NIX!)
- };