Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jappeace opened this issue Jun 19, 2023 · 3 comments
Open

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

jappeace opened this issue Jun 19, 2023 · 3 comments

Comments

@jappeace
Copy link

jappeace commented Jun 19, 2023

  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
Copy link
Member

roberth commented Jun 20, 2023

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
Copy link
Author

jappeace commented Jun 20, 2023

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants