9 votes

A sane, batteries-included starter template for running NixOS on WSL

5 comments

  1. [5]
    LGUG2Z
    (edited )
    Link
    This is one of the projects that I mentioned I was working on in the recurring thread. There are quite a few people in different parts of the internet who have have expressed interest in knowing...

    This is one of the projects that I mentioned I was working on in the recurring thread. There are quite a few people in different parts of the internet who have have expressed interest in knowing more about how I use NixOS on Windows under WSL.

    My own NixOS configuration handles pretty much everything; WSL, a Linux desktop, my Macbook, remote servers, even services that I run.

    I took some time to pull out the configuration for WSL into a flat starter template and made a walkthrough video of the quickstart to help people get started.

    My own journey with NixOS began on WSL, as it felt pretty safe and self-contained, with no concerns around bricking my system. For a while, I had both my old Arch and new NixOS WSL VMs running concurrently, but pretty soon I was able to destroy the Arch VM and start working on the NixOS VM full-time.

    3 votes
    1. [4]
      jwong
      Link Parent
      I won’t have Windows in hand for a while, but this sounds interesting and accessible way to give it a shot - I was always hitting little speed blocks with WSL that made me just reach for *nix...

      I won’t have Windows in hand for a while, but this sounds interesting and accessible way to give it a shot - I was always hitting little speed blocks with WSL that made me just reach for *nix instead.

      Could you talk about your MacBook remote servers?

      2 votes
      1. [2]
        LGUG2Z
        Link Parent
        Aha I missed a comma in my post, that was supposed to be Macbook, comma, remote servers! However, since it is now possible to (easily) virtualize macOS on Macbooks, there have been a few...

        Aha I missed a comma in my post, that was supposed to be Macbook, comma, remote servers!

        However, since it is now possible to (easily) virtualize macOS on Macbooks, there have been a few instances, mainly at work, where I've been able to test changes using Nix (Flakes) that target Macbooks (for an org of developers) in a virtualized instance of macOS, without running the risk of screwing up my machine. In this way, it's a very powerful testing tool for changes that have a large (operating-system level) blast radius.

        3 votes
        1. jwong
          Link Parent
          Ahhh! Thanks for the link in UTM. I keep seeing mention of it as a great way to get virtualisation on the Apple silicon.

          Ahhh! Thanks for the link in UTM. I keep seeing mention of it as a great way to get virtualisation on the Apple silicon.

          2 votes
      2. vord
        Link Parent
        I'll say. I currently have to run an arcane winsock reset command on startup to get WSL working again. Barebones linux is a cakewalk compared to keeping WSL from breaking itself.

        I'll say. I currently have to run an arcane winsock reset command on startup to get WSL working again.

        Barebones linux is a cakewalk compared to keeping WSL from breaking itself.

        3 votes