Search code examples
nixnixos

nix rebuild switch cause "fchmod() of /tmp/.X11-unix failed: Read-only file system"


I have restart on WSL my installation from scratch:

 wsl --unregister Nixos
 wsl --import NixOS .\NixOS\ nixos-wsl-installer.tar.gz --version 2
 wsl -s Nixos
 wsl

nixos-wsl-installer.tar.gz comes from https://github.com/nix-community/NixOS-WSL/releases/tag/22.05-5c211b47

instalation done. nixos has started

I haven't changed anything in /etc/nixos/configuration.nix yet

  sudo nixos-rebuild switch

fchmod() of /tmp/.X11-unix failed: Read-only file system

What does it mean?


Solution

  • Something to do with being in WSL - sudo mount -o remount,rw /tmp/.X11-unix seems to fix it.

    See GitHub issue