Let \( f(x) = x^4 - 4x^3 + 6x^2 - 4x + k \). Given that \( x=1 \) is a root of both \( f(x) \) and its derivative \( f'(x) \), determine the value of \( k \). Let's think step by step and output the final answer within \boxed{}.
user