Introduce networking.hostFiles
option
#81945
Merged
+47
−32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
When blocklists are built with a derivation, using
extraHosts
wouldrequire IFD (import-from-derivation), since the result of the derivation needs to be converted to
a string again.
By introducing this option no IFD is needed for such use-cases, since
the fetched files can be assigned directly.
A second commit changes the cjdns module to use this new option so no IFD is needed. A third commit just fixes a doc rendering issue in the cjdns module.
This change will be useful for #80113 as well, so ping @pasqui23
Ping @oxij @regellosigkeitsaxiom for the networking module
Ping @ehmry @joachifm for related issues #20422 and #21592
Things done
nix-build nixos --arg configuration ./config.nix -A config.environment.etc.hosts.source
before and after this change, making sure nothing changes, even withextraHosts
andservices.cjdns
enabled (and configured).nix-build nixos/release.nix -A manualHTML.x86_64-linux
successfully