In dolfinx, how to apply a fixed displacement condition to a vertex?

Replace fdim with 0.
i.e. instead of boundary facets, you want the boundary_vertices.