LnL7 / nix-darwin

nix modules for darwin
MIT License
2.76k stars 428 forks source link

Option to configure /etc/hosts file #1035

Open secana opened 1 month ago

secana commented 1 month 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 1 month ago

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

secana commented 3 weeks ago

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

Enzime commented 1 week ago

Reopening this until either #939 or #807 gets merged