Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Porting a macOS Clojure dev setup to Windows WSL2

Porting a macOS Clojure dev setup to Windows WSL2

Presented at wslconf.dev 2020

Michiel Borkent

September 10, 2020

More Decks by Michiel Borkent

Other Decks in Programming


  1. Porting a macOS Clojure dev setup to Windows WSL2 Michiel

    Borkent @borkdude 2020-09-10
  2. About me • Clojure/Script developer for over 10 years •

    Moved to Mac roughly 10 years ago (cmd.exe, Clojure tooling) • I like the flexibility of laptops, but I also like the power of a desktop
  3. None
  4. https://covid19.doctorevidence.com/

  5. A new PC • 128GB memory, 2GB SSD, Ryzen 3950X,

    NVIDIA graphics • Equivalent Mac Pro machine would 3x more ($3000 vs $9000) • Want to use it as a remote dev machine • But no macOS: now what? • Windows + WSL2 to the rescue?
  6. Installing Windows without Windows • Tried bootable USB on macOS

    without success • Friend with Windows laptop, Rufus • Could MS make this more streamlined for non-Windows users?
  7. Basic setup

  8. Transferring work dev setup • Needed to copy my zsh

    scripts and a couple of databases • Wanted to use rsync. • Enabled ssh:
 $ sudo service ssh start • How to enable on boot? Systemd, but wsl should already be running? • Windows firewall doesn't forward and blocks port 22 ...
  9. Open/forward ports: #4150 Useful Powershell script in comments:

  10. Start wsl / ssh at login

  11. All rsynced, dev setup runs! Worth noting: even ClojureScript hot

    reloading works over remote connection! Tailscale for access outside home
  12. Emacs on remote machine In Terminal: git-gutter, flycheck-inline
 Other options:

    tramp, ssh -X, FUSE/sshfs Fix iTerm2 key bindings: https://joppot.info/en/2017/09/12/4056
  13. VSCode + Calva + clj-kondo + SSH extension

  14. Reboot after patch Tuesday Configure in group policy, see this

  15. WSL2 executing Windows programs