diff --git a/modules/config/networking.nix b/modules/config/networking.nix index 4349b52347a..562d5144531 100644 --- a/modules/config/networking.nix +++ b/modules/config/networking.nix @@ -49,10 +49,10 @@ in { # /etc/hosts: Hostname-to-IP mappings. source = pkgs.writeText "hosts" '' - ${cfg.extraHosts} ${optionalString (cfg.hostName != "") "127.0.0.1 ${hostnameWithDomain} ${cfg.hostName}"} 127.0.0.1 localhost ${localhostWithDomain} + ${cfg.extraHosts} ''; target = "hosts"; }