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

nixos/nsd: Allow to configure root zone #40054

Merged
merged 1 commit into from May 7, 2018
Merged

Conversation

aszlig
Copy link
Member

@aszlig aszlig commented May 7, 2018

When trying to run NSD to serve the root zone, one gets the following error message:

error: illegal name: '.'

This is because the name of the zone is used as the derivation name for building the zone file. However, Nix doesn't allow derivation names starting with a period.

So whenever the zone is . now, the file name generated is root instead of ..

I also added an assertion that makes sure the user sets services.nsd.rootServer, otherwise NSD will fail at runtime because it prevents serving the root zone without an explicit compile-time option.

Tested this by adding a root zone to the nsd NixOS VM test.

Cc: @qknight

When trying to run NSD to serve the root zone, one gets the following
error message:

error: illegal name: '.'

This is because the name of the zone is used as the derivation name for
building the zone file. However, Nix doesn't allow derivation names
starting with a period.

So whenever the zone is "." now, the file name generated is "root"
instead of ".".

I also added an assertion that makes sure the user sets
services.nsd.rootServer, otherwise NSD will fail at runtime because it
prevents serving the root zone without an explicit compile-time option.

Tested this by adding a root zone to the "nsd" NixOS VM test.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @hrdinka, @qknight
@hrdinka
Copy link
Contributor

hrdinka commented May 7, 2018

Tested locally and on a production deployment. Works as expected. Thanks you very much for the change 👍

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

Successfully merging this pull request may close these issues.

None yet

3 participants