The equation of the curve is \( x^2 + y^2 - 2x - 4y + 2 = 0 \).
The equation of the line is \( x + y = k \implies y = k - x \).
Substitute \( y = k - x \) into the equation of the curve:
$$ x^2 + (k - x)^2 - 2x - 4(k - x) + 2 = 0 $$
$$ x^2 + k^2 - 2kx + x^2 - 2x - 4k + 4x + 2 = 0 $$
$$ 2x^2 + (2 - 2k)x + (k^2 - 4k + 2) = 0 $$
Let the roots of this quadratic equation in \( x \) be \( x_1 \) and \( x_2 \).
The corresponding \( y \) values are \( y_1 = k - x_1 \) and \( y_2 = k - x_2 \).
So, the points of intersection are \( A(x_1, y_1) \) and \( B(x_2, y_2) \).
Since \( \angle AOB = 90^\circ \), the dot product of vectors \( \vec{OA} \) and \( \vec{OB} \) is zero.
$$ \vec{OA} \cdot \vec{OB} = x_1 x_2 + y_1 y_2 = 0 $$
Substitute \( y_1 = k - x_1 \) and \( y_2 = k - x_2 \):
$$ x_1 x_2 + (k - x_1)(k - x_2) = 0 $$
$$ x_1 x_2 + k^2 - k(x_1 + x_2) + x_1 x_2 = 0 $$
$$ 2x_1 x_2 - k(x_1 + x_2) + k^2 = 0 $$
From the quadratic equation \( 2x^2 + 2(1 - k)x + (k^2 - 4k + 2) = 0 \), we have:
Sum of roots: \( x_1 + x_2 = -\frac{2(1 - k)}{2} = k - 1 \)
Product of roots: \( x_1 x_2 = \frac{k^2 - 4k + 2}{2} \)
Substitute these into the condition \( 2x_1 x_2 - k(x_1 + x_2) + k^2 = 0 \):
$$ 2 \left( \frac{k^2 - 4k + 2}{2} \right) - k(k - 1) + k^2 = 0 $$
$$ k^2 - 4k + 2 - k^2 + k + k^2 = 0 $$
$$ k^2 - 3k + 2 = 0 $$
$$ (k - 1)(k - 2) = 0 $$
So, \( k = 1 \) or \( k = 2 \).
Given \( k>1 \), the value of \( k \) is 2.