Hardcode path to usermod
All checks were successful
/ dev-shell (push) Successful in 30s
/ rust-packages (push) Successful in 35s
/ check (push) Successful in 1m11s
/ terraform-providers (push) Successful in 58s
/ systems (push) Successful in 3m30s

Apparently adding dependency on `su` does not seem
to put usermod in path
This commit is contained in:
Kaare Hoff Skovgaard 2025-07-19 22:50:23 +02:00
parent ac1c6adc75
commit e7c73f98dd
Signed by: khs
GPG key ID: C7D890804F01E9F0

View file

@ -11,7 +11,6 @@ let
setKhsPassword = pkgs.writeShellApplication { setKhsPassword = pkgs.writeShellApplication {
name = "set-khs-password"; name = "set-khs-password";
runtimeInputs = [ runtimeInputs = [
pkgs.su
pkgs.uutils-coreutils-noprefix pkgs.uutils-coreutils-noprefix
]; ];
text = '' text = ''
@ -23,7 +22,7 @@ let
exit 1 exit 1
fi fi
hashed_passwd="$(cat /run/unix-users/khs)" hashed_passwd="$(cat /run/unix-users/khs)"
usermod --password "$hashed_passwd" khs /run/current-system/sw/bin/usermod --password "$hashed_passwd" khs
''; '';
}; };
in in