hercules-ci / arion

Run docker-compose with help from Nix/NixOS
Apache License 2.0
631 stars 47 forks source link

I had to force set hostName to get httpd to work #198

Open jappeace opened 1 year ago

jappeace commented 1 year ago
  config.services.webserver.nixos.configuration.networking.hostName = lib.mkForce "treesweb";

If I didn't do this httpd would crash because no servername was set.

If I didn't force set this, it said it would conflict with arion:

  config.services.webserver.service.hostname = "treesweb";

which was a lie, this value is optional (appearrantly)

roberth commented 1 year ago

config.services.webserver.service.hostname

This only has a null default so can be set.

onfig.services.webserver.nixos.configuration.networking.hostName

This seems to be the troublemaker. It is set to "" unless you force it. I suspect that this odd empty value has to do with adopting the hostname provided by the container runtime. NixOS support and container hostname support were merged 2 days apart but were the result of different authors, so I think it just wasn't thought through at the time. So right now there's no real connection between the two options. We could make the one set the other. What do you think?

jappeace commented 1 year ago

yes, I'd expect config.services.webserver.service.hostname to be set to webserver (by default) since that's the name of the <name>, and I also expect config.services.webserver.nixos.configuration.networking.hostName to mirror that value (by default).

jappeace commented 1 year ago

I don't think this is a high priority issue however, the other one was annoying, this issue I can live with :)