diff --git a/modules/config/networking.nix b/modules/config/networking.nix
index f0aafc6b4041..c6ea171bf3d4 100644
--- a/modules/config/networking.nix
+++ b/modules/config/networking.nix
@@ -43,6 +43,7 @@ in
         source = pkgs.writeText "hosts"
           ''
             127.0.0.1 localhost
+            ::1 localhost
             ${cfg.extraHosts}
           '';
         target = "hosts";