diff --git a/modules/config/networking.nix b/modules/config/networking.nix index ff4d0f3fee4..65f22445b06 100644 --- a/modules/config/networking.nix +++ b/modules/config/networking.nix @@ -41,6 +41,9 @@ in source = pkgs.writeText "hosts" '' ${config.networking.extraHosts} + ${if config.networking.hostName != "" + then "127.0.0.1 ${config.networking.hostName}" + else ""} 127.0.0.1 localhost ''; target = "hosts";