treewide: migrate more to bzlmod

This does migrate nearly everything to bzlmod and away from the "old"
WORKSPACE system. We do have to use some workarounds and there is no
good way to get the path to a repository. This definitively requires
some more love in future CLs but this should cover the basics. See
monogon-dev/monogon#343 for more information.

Change-Id: I0e188d8708b66fcdbdf0adc9143c93160e3395ae
Reviewed-on: https://review.monogon.dev/c/monogon/+/3357
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Reviewed-by: Leopold Schabel <leo@monogon.tech>
Tested-by: Jenkins CI
diff --git a/MODULE.bazel b/MODULE.bazel
index a25ccc7..ca7bde1 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -78,6 +78,14 @@
 bazel_dep(name = "toolchains_protoc", version = "0.3.1")
 bazel_dep(name = "protobuf", version = "27.2")
 
+# Load musl toolchain Metropolis sysroot tarball into external repository.
+musl_sysroot_rule = use_repo_rule("//build/toolchain/musl-host-gcc:sysroot_repository.bzl", "musl_sysroot_rule")
+
+musl_sysroot_rule(
+    name = "musl_sysroot",
+    snapshot = "//build/toolchain/musl-host-gcc:sysroot.tar.xz",
+)
+
 # Register our custom CC toolchains. Order matters - more specific toolchains must be registered first.
 # (host_cc_toolchain won't care about //build/platforms/linkmode, but musl_host_toolchain won't
 # match anything unless its linkmode is set).