devenv icon indicating copy to clipboard operation
devenv copied to clipboard

hosts = { ... } doesn't work if /etc/hosts is not writable

Open zoechi opened this issue 1 year ago • 2 comments

This should be added to the docs womewhere:

To make hosts (hostctl) work in NixOS this setting is required. It changes /etc/hosts to be writable for root.

environment.etc.hosts.mode = "0644";

zoechi avatar Jan 19 '24 12:01 zoechi

Yeah, we should emit that error, could you make a PR?

domenkozar avatar Mar 07 '24 11:03 domenkozar

I had to delete the .devenv folder for this to work for some reason. But it works after:

  1. make /etc/hosts writeable
  2. delete projects .devenv folder
  3. devenv up
  4. devenv shell ping myhostname

ParetoOptimalDev avatar Aug 01 '24 18:08 ParetoOptimalDev