Marshall Bowers

Conjurer of code. Devourer of art. Pursuer of æsthetics.

Windows Woes

Saturday, April 4, 2020
1,277 words
7 minute read

Greetings, travelers.

I have quite the tale for you today, so grab a hot cup of tea (or some other beverage of your choosing) and settle in, because we're about to get right into it.

I recently purchased an NVMe M.2 drive for my desktop. It arrived earlier this week, so my plan for this weekend was to install Windows 10 on it and replace my twice-as-small drive that is currently running Windows.

Things did not go according to plan.

The first snag I encountered was that I did not have the proper screws to connect the M.2 drive to the motherboard. I didn't have the spare parts for my motherboard on hand, and the spare parts leftover from building my wife's computer also did not contain the screw I needed.

Not being one for giving up so easily, I made do with using a cable tie to hold the drive in place. For anyone screaming at me through your screen right now: don't worry, I ordered some proper screws and they'll be here on Tuesday.

With that little roadbump out of the way, I moved on to the process of installing Windows. Despite my best efforts, I still managed to fall victim to some of the dark patterns littered throughout the Windows 10 installer. Somehow I ended up installing Windows 10 using a Microsoft account instead of a local account. This (I believe) in turn forced me to set up a PIN for my user account. There was no way to skip this requirement. I continued to plod through the Windows 10 installer, trying desperately to avoid all of the extra crap that Microsoft tries to force upon you during the installation process.

Once the installation completed, I started configuring Windows 10. I installed my typical programs: Google Chrome, Nvidia drivers (yet another process fraught with blatant dark patterns), Discord, and some others. It was at some point in this process that I noticed something was wrong: my user folder name was incorrect.

For some unknown reason, my Windows user folder was named ellio. Not my preferred maxdeviant, or even Marshall Bowers; just ellio. No doubt this was a truncation of the email address attached to my Microsoft account, but the fact that it truncated after five characters is just totally bizarre.

Having noticed this flagrant misconfiguration I started taking steps to remedy it. Seeing no way of renaming the user folder from within the account management options, I fired up Command Prompt as Administrator and attempted to rename my user folder by hand. Permission denied. Even running with elevated privileges I couldn't fix the awful name Windows had chosen for my user folder.

At this point I was completely fed up with the whole affair. In this moment, I decided that Windows was not deserving of this lovely new NVMe M.2 drive and its glorious 1TB of space. No, this privilege belongs to the new favored child: NixOS.

With my mind made up, I plugged in my NixOS installation USB and said goodbye to Windows. One power cycle later and I was greeted by the welcome sight of the NixOS installer.

For the uninitiated, NixOS is a Linux distribution built on top of the Nix package manager. Its primary selling point is that it allows you to configure your entire system using declarative configuration files. These files can then be backed up somewhere, like GitHub, and then applied to a fresh NixOS installation to put it into the same state.

I've been using NixOS since November of last year so I already had my configuration files ready to go. It was time to see just how straightforward setting up a new system based on them would be. I followed the steps in the NixOS manual to partition and format the drive. When it came time to configure the system, I curled down my existing configuration.nix file from GitHub and used that in place of the default one. With my configuration file in place I let the installer run through.

Once the base system finished installing and booted into the new NixOS installation, I had a couple more things to do in order to get the system fully operational. Much of my NixOS configuration is performed by Home Manager, a project that allows you to manage individual user environments with Nix. It's basically like a configuration.nix but at the user level rather than the system level.

Restoring my user configuration with Home Manager was just as painless. The steps to do so can be found here. With that done, my NixOS installation was complete, and almost indistinguishable from the old one.

It's kind of eerie, in a way. Normally a brand-new OS installation feels so fresh and barren, but this time around it felt like nothing had changed. To me, this is the value add of NixOS and declarative system configuration: the ability to take a fresh install and immediately restore it to exactly the way you want it.

I was incredibly pleased with how smoothly the installation process went. However, there's always room for improvement! To that end, I spent some of today whipping up an installation script that I can use to get a fresh NixOS install up and running even faster in the future.

At some point during this crazy journey I had lost access to my existing Windows installation. Attempting to boot into it immediately showed an error stating that a device could not be found. As much as I would have loved to say "forget it", I still need access to Windows for work, so I was left with another mystery to solve.

It turns out that when I had tried installing Windows on the new drive, Windows had decided to install the bootloader on the old NixOS drive. Even once the new Windows install was replaced by NixOS the bootloader still remained, although now it was pointing to a non-existent Windows installation. Thus, attempting to boot could not possibly work.

After the botched Windows 10 install, I had disabled a number of SATA ports through UEFI in an attempt to keep Windows from installing its bootloader in places that it shouldn't. However, thanks to a very confusing UEFI interface, I had accidentally disabled the existing Windows drive, so the only Windows install that showed up in my GRUB bootloader was the non-existent one. Once I re-enabled the existing Windows drive in UEFI I was now able to boot back into Windows.


As I'm sure you can tell from this story, my weekend has been nothing short of crazy so far. What started out as a presumably simple task ended with me being immeasurably frustrated with Windows and ready to wash my hands of it for good.

This whole ordeal has given me a lot to think about. I find the current state of the two mainstream operating systems—Windows 10 and macOS Catalina—incredibly worrisome. I see both of these operating systems moving in directions that I don't want to follow in.

While I'm not yet ready to completely ditch Windows or macOS, I intend to spend far less time with them. I will also start taking appropriate steps to distance myself from these platforms and more fully embrace NixOS.

If anyone is interested in NixOS, feel free to check out my dotfiles or shoot me an email.

Until next time,

Marshall