The general problem is given by (Linear Least Squares with Linear Equality Constraints):
$$
\begin{alignat*}{3}
\arg \min_{x} & \quad & \frac{1}{2} \left\| A x - b \right\|_{2}^{2} \\
\text{subject to} & \quad & C x = d
\end{alignat*}
$$
The Lagrangian is given by:
$$ L \left( x, \nu \right) = \frac{1}{2} \left\| A x - b \right\|_{2}^{2} + {\nu}^{T} \left( C x - d \right) $$
From KKT Conditions the optimal values of $ \hat{x}, \hat{\nu} $ obeys:
$$ \begin{bmatrix}
{A}^{T} A & {C}^{T} \\
C & 0
\end{bmatrix} \begin{bmatrix}
\hat{x} \\
\hat{\nu}
\end{bmatrix} = \begin{bmatrix}
{A}^{T} b \\
d
\end{bmatrix} $$
Now all needed is to solve the above with any Linear System Solver.
To adapt this into your problem we can set $ A = I $ and solve.