NixOS on Framework Laptop 13

@gaben I’ve been running NixOS in VMware on an M1 Macbook Air for the last year or so following https://github.com/mitchellh/nixos-config’s configs. I wanted to exit from the Apple ecosystem, so I got a Framework 13 AMD. Knowing the hardware was super new, I decided to once again run NixOS via virtualization on a Framework Ubuntu Host for stability. Here’s some notes to hopefully get you started - Let me know if you have any questions, I’m happy to help – I feel I’m always going to be a nix newbie lol. I’m close to finally ironing out all the issues I’ve experienced in this setup. (Though now with the above PR merged, I’m likely to go full bare metal install with NixOS…)

VMware - I tried this initially as I was using this on MacOS; however, I hit too many performance and odd issues, so decided to try VirtualBox out.

Wayland is just kinda a no-go it seems on any virtualization program, so I switched from sway wm back to i3wm.

VirtualBox - After setting the below configs in the host and inside the VM… it’s ‘mostly’ stable and relatively performant, though I’m still trying to debug, what I expect, is a video acceleration issue (dmesg shows [drm:vmw_msg_ioctl [vmwgfx]] ERROR Failed to open channel) and performance isn’t as good as on Ubuntu when compiling or transcribing via local whisper.cpp projects I’m working on.

VirtualBox Host:

  • Setup as described in my README.md below. (You’ll need to portforward on VB 2222 host to 22 guest, if you want to install like I’m doing in my nixos-config)
  • Increase video ram (VB has a max of 128MB in the GUI and 256MB in a cli config): VBoxManage modifyvm “Name of VM” --vram 256
  • 8 core // 10GB ram
  • set display scaling to 133% (when using my resolution set, see GitHub link below)

NixOS Guest:
You can follow some of my latest commits here: GitHub - nodu/nixos-config: My NixOS configurations. Specifically looking at the machine/vm-shared.nix config:
https://github.com/nodu/nixos-config/blob/main/machines/vm-shared.nix#L72 for display resolution in xserver.

Good luck!

1 Like