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

feat: adds support for multiple IP configurations for one hostname in hostctl.nix #858

Conversation

rmachado-studocu
Copy link
Contributor

@rmachado-studocu rmachado-studocu commented Nov 2, 2023

What does this PR do

  • Adds support for multiple IPs to be configured for one hostname. This is specially important if you want to configure both 127.0.0.1 and ::1 to be the resolution for the same hostname (e.g example.com).

I'd highlight that this PR adds support for multiple IPs (as a list of strings) but it also supports the original approach of having just a string.

In OSes like MacOS, where local dns resolution requires both configurations (otherwise you get a 10s delay on it), this is quite important for performance.

It's my first time coding in Nix language so, please bear with my poor coding skills on it. 😄

Thank you for your time reviewing my PR and for allowing me to learn with your expertise.

Closes #857

@rmachado-studocu
Copy link
Contributor Author

/cc @domenkozar as agreed in a previous Discord conversation. 👍

@rmachado-studocu rmachado-studocu changed the title fix: adds support for multiple IP configurations for one hostname in hostctl.nix feat: adds support for multiple IP configurations for one hostname in hostctl.nix Nov 2, 2023
@domenkozar
Copy link
Member

I'd appreciate if you can add an example to https://github.com/cachix/devenv/blob/main/examples/mkcert/devenv.nix so that at least we know Nix evaluates.

@domenkozar
Copy link
Member

You need to run pre-commit run -a

@rmachado-studocu
Copy link
Contributor Author

@domenkozar I've run pre-commit and pushed the changes 👍 Thanks!

@domenkozar domenkozar merged commit 6fd52e0 into cachix:main Nov 4, 2023
119 of 190 checks passed
@rmachado-studocu rmachado-studocu deleted the add-support-for-multiple-ips-for-one-hostname branch November 4, 2023 18:52
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

Successfully merging this pull request may close these issues.

hostctl.nix doesn't support multiple IP versions for a single hostname
2 participants