Skip to content

Instantly share code, notes, and snippets.

@tazjin
Created May 25, 2018 08:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tazjin/cb365d2ad875473ccd58e789ed89c62a to your computer and use it in GitHub Desktop.
Save tazjin/cb365d2ad875473ccd58e789ed89c62a to your computer and use it in GitHub Desktop.
# Generate an immutable /etc/resolv.conf from the networking.nameservers setting:
environment.etc."resolv.conf" = with lib; with pkgs; {
source = writeText "resolv.conf" ''
${concatStringsSep "\n" (map (ns: "nameserver ${ns}") config.networking.nameservers)}
options edns0
'';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment