Nix on Windows?

My use case is that I want:

  • to have one repo where my nix source lives.
  • I want this source to setup my workstations, servers, etc
  • I want this source to run on windows, Linux, and Mac. where i want it to configure those platforms.
  • I only expect to create small wrapper tools curl blah | sh or the powershell iex equiv to kick start the setup on a fresh machine.

I read a lot about people claiming “omg it works on windows via wsl2”, but when you look at what they’re doing… it’s no different to what they do on linux, completely disregarding the configuration and provisioning of the windows side of things.

I had seen only one mention so far (in this thread i think) that since you could execute windows binaries from within wsl2, that there could perhaps be a way to make nix do windows configuration that way ?

5 Likes