Holochain Forum

Native NixOS for Windows?

Or just dual boot Ubuntu and then install nix-shell.

1 Like

Hi, did anyone try running VS Code Remote development (over SSH)?

When trying this, it seems I need to install the vscode server in the NIXOS vagrant container (I’m using VirtualBox on Windows).
This, as I understand it, requires enabling allowUnfree = true; in a file .nixpkgs/config.nix (which I can’t find), or in etc/nixos/configuration.nix.
The file is read-only, any ideas how to go about changing the configuration file properly? Of whether this is even a workable way?

2 Likes

@Qubeo the nixos plugin for vagrant lets you set configuration in the provisioning step

the vagrant file that i put in the gist used in the quickstart guide is really just an MVP example, part of what is good about vagrant is that it can be tailored per-project

Hi, I can’t figure out, how to use IDE with Vindows…

Virtualbox allows me to expose a Vagrant folder to windows (as a shared folder), but when I get into nix-shell, I have no idea how to expose the folders I’m creating with nix-shell… does anyone have any idea?

Or what IDE do you use when using Windows + VirtualBox + Vagrant + nix-shell?
Do you use VSCode, or something els?

Okay, so it’s a problem with mounting the shared folder. It has worked before, but for some it doesn’t now. I get:

"GuestAdditions versions on your host (6.0.12) and guest (5.2.8) do not match.
The guest's platform ("nixos") is currently not supported, will try generic Linux method...
Copy iso file C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
Mounting Virtualbox Guest Additions ISO to: /mnt
mount: /mnt: mount point does not exist.
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly."

I tried installing: $ vagrant plugin install vagrant-vbguest, but no luck.

For anyone interested, I managed to get native nixos works with WSL2. You have to have a minimum build of 18917, but you can get that from the windows insider program. Once you are on that build, download the Ubuntu app and follow these instructions : https://docs.microsoft.com/en-us/windows/wsl/wsl2-install

You will have nixos running out of the ubuntu subsystem

1 Like

When you’ve SSH’d into the box, make sure you navigate to the shared folder which gets exposed to Windows with cd /vagrant

oh yes and be aware that additional shared folders can be configured in the vagrantfile

Thanks. The problem is no folder gets exposed, because there’s a mismatch between the guest additions: Additions versions on your host (6.0.12) and guest (5.2.8) do not match. and the vagrant-vbguest plugin doesn’t to seem to work to remedy this either.

@Qubeo we rebuilt the vagrant box in the last few days, when is the last time you tested this?

Hi David, yesterday evening. When I downgrade my VirtualBox to 5.2.8., I get:

GuestAdditions seems to be installed (5.2.8) correctly, but not running.
bash: line 4: start: command not found
bash: line 4: start: command not found
bash: line 4: setup: command not found
==> default: Checking for guest additions in VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

 setup

Stdout from the command:



Stderr from the command:

bash: line 4: setup: command not found

Hi Quebo,

Let me debug this and get back to you :slightly_smiling_face:

This appears to be working for me, have you tried removing your virtual image and starting again? I’m using latest virtual box / vagrant

Hey @Qubeo did this help at all?

also i am using WSL 2 on my spectre with ubuntu as @AshantiMutinta suggested and it has been smooth so far with holonix :+1:

i’m using it to review the docs right now :slight_smile:

it might be worth recommending this as the best path forward for serious development (e.g. not a “simple hackathon setup”)

Hi, thank you for your reply!

Turns out that it worked when I removed the whole stack and installed the versions linked from the guide - it looks like an update of one of the parts (Vagrant or VirtualBox) caused the problem.

1 Like

Yeah, that makes sense.

In the end I got so frustrated that I finally installed Ubuntu in a dual boot alongside Windows.

It seems to be working so far :slight_smile:

Thank you for your help!

haha yeah, it looks like for a lot of people the path of least resistance is just “somehow ubuntu”

this is totally fine, have fun!

Going to give this a go on my windows box. Could be nice to get it into the quick start.

1 Like

i made a rough chart of the different ways that windows can be setup with colour coding by how reliable and easy they are to setup and maintain over time

1 Like