install: add progress to ui
This commit is contained in:
@@ -545,7 +545,14 @@ const InstallSummary = () => {
|
||||
);
|
||||
};
|
||||
|
||||
type InstallTopic = "generators" | "upload-secrets" | "nixos-anywhere";
|
||||
type InstallTopic = [
|
||||
"generators",
|
||||
"upload-secrets",
|
||||
"nixos-anywhere",
|
||||
"formatting",
|
||||
"rebooting",
|
||||
"installing",
|
||||
][number];
|
||||
|
||||
const InstallProgress = () => {
|
||||
const stepSignal = useStepper<InstallSteps>();
|
||||
@@ -599,6 +606,15 @@ const InstallProgress = () => {
|
||||
<Match when={installState()?.topic === "nixos-anywhere"}>
|
||||
Running nixos-anywhere ...
|
||||
</Match>
|
||||
<Match when={installState()?.topic === "formatting"}>
|
||||
Formatting ...
|
||||
</Match>
|
||||
<Match when={installState()?.topic === "installing"}>
|
||||
Installing ...
|
||||
</Match>
|
||||
<Match when={installState()?.topic === "rebooting"}>
|
||||
Rebooting ...
|
||||
</Match>
|
||||
</Switch>
|
||||
</Match>
|
||||
</Switch>
|
||||
|
||||
@@ -203,21 +203,21 @@ def run_machine_install(opts: InstallOptions, target_host: Remote) -> None:
|
||||
|
||||
notify_install_step("nixos-anywhere")
|
||||
run(
|
||||
cmd + +["--phases", "kexec"],
|
||||
[*cmd, "--phases", "kexec"],
|
||||
RunOpts(log=Log.BOTH, prefix=machine.name, needs_user_terminal=True),
|
||||
)
|
||||
notify_install_step("formatting")
|
||||
run(
|
||||
cmd + +["--phases", "disko"],
|
||||
[*cmd, "--phases", "disko"],
|
||||
RunOpts(log=Log.BOTH, prefix=machine.name, needs_user_terminal=True),
|
||||
)
|
||||
notify_install_step("installing")
|
||||
run(
|
||||
cmd + +["--phases", "install"],
|
||||
[*cmd, "--phases", "install"],
|
||||
RunOpts(log=Log.BOTH, prefix=machine.name, needs_user_terminal=True),
|
||||
)
|
||||
notify_install_step("rebooting")
|
||||
run(
|
||||
cmd + +["--phases", "reboot"],
|
||||
[*cmd, "--phases", "reboot"],
|
||||
RunOpts(log=Log.BOTH, prefix=machine.name, needs_user_terminal=True),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user