Functionality like this would be useful to have available:
lm(formula = mpg ~ cyl + wt, data = mtcars) |> coef() -> coefficients
lm(formula = mpg ~ cyl + wt, data = mtcars) |> vcov() -> covar_mat
set_errors(coefficients, value = covar_mat) -> coefficients_covar
It is a bit cumbersome to set the covariances one by one.