LnL7 / nix-darwin

nix modules for darwin
MIT License
3.23k stars 460 forks source link

Option to configure /etc/hosts file #1035

Open secana opened 3 months ago

secana commented 3 months ago

Hi!

In NixOS there is the option networking.hosts to configure the /etc/hosts file for additional DNS entries.

Example:

networking.hosts = {
  "127.0.0.2" = ["other-localhost"];
  "192.0.2.1" = ["mail.example.com" "imap.example.com"];
};

See NixOS Wiki - Networking for more information.

However, a similar options seems to be missing on nix-darwin regarding the listed options here: https://daiderd.com/nix-darwin/manual/index.html

Can we add the networking.hosts option to nix-darwin or is there already another way to configure the hosts file?

ibizaman commented 3 months ago

Agreed! see https://github.com/LnL7/nix-darwin/pull/939

secana commented 3 months ago

Oh, I searched for similar issues but missed the PR. I'll close this one as a duplicate.

Enzime commented 2 months ago

Reopening this until either #939 or #807 gets merged

Teebor-Choka commented 2 days ago

👍