New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos-configuration-on-vm.md: Show how to run headless #768
Conversation
Deploy Preview
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out. I like the general direction of the change, but think it needs some streamlining.
@@ -180,13 +180,19 @@ ls -R ./result | |||
run-nixos-vm | |||
``` | |||
|
|||
Run the virtual machine: | |||
To run the virtual machine in a new window (requires GUI environment): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To run the virtual machine in a new window (requires GUI environment): | |
Run the virtual machine in the current terminal: |
Let's not show all the options here, that's what reference documentation is for. The purpose of this tutorial (as any tutorial here) is to serve as a first encounter, with pointers to all the details.
I prefer the terminal version as that is or at least appears more lightweight, and showing a the flag here should provide enough of a hint that omitting it may give you a GUI.
./result/bin/run-nixos-vm -nographic | ||
``` | ||
|
||
You will see the boot process of the virtual machine and end at the `gdm` login screen where you can log in as `alice` with the password `testpw`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I strongly recommend against describing perceptions, as not everyone can even have them. Describe what the machine does instead.
You will see the boot process of the virtual machine and end at the `gdm` login screen where you can log in as `alice` with the password `testpw`. | |
This will show the boot process of the virtual machine and end at the `gdm` login screen where you can log in as `alice` with the password `testpw`. |
I currently can't check it myself: will that indeed be a terminal prompt? Isn't GDM a graphical tool?
|
||
```shell-session | ||
./result/bin/run-nixos-vm | ||
``` | ||
|
||
This command opens a window that shows the boot process of the virtual machine and ends at the `gdm` login screen where you can log in as `alice` with the password `testpw`. | ||
To run it in the current terminal instead, pass `-nographic`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally, instead of presenting multiple options - which is distracting to first-time users because they'll be busy with following one set of instructions, and also doesn't scale well, since where do you draw the line? – we should link to the manual right afterward, such as:
Refer to the Nixpkgs manual for a [list of all commmand-line options to `run-nixos-vm`](<URL>).
(If that exists. Otherwise there's likely a --help
flag?)
Deploy Preview
|
@fricklerhandwerk I've updated the PR. Your comment was right that of course with the terminal, you can't see the configured GDM. I think it's important to describe both the GUI and non-GUI options, because
|
How is this addressed in the PR then?
Instead of overloading learners with options, we could add a graphical environment to the requirements at the beginning and more explicitly point to the manual for details.
All these problems and the hassle required to work around them indicate that the additional information you collected should be put into the NixOS manual. For instance, that you can pass any QEMU flags, and how to handle terminal scrambling should definitely go into the manual. I think all this is important to know, but not for the first encounter. Therefore, let's put it in the manual. I opened #769 to make the change here as described and suggest closing this PR. Please ping me or @NixOS/documentation-team if you want to do the NixOS manual PR. Sorry for the detour, I needed the iteration to understand the full depth of the problem. |
Feel free to reopen if there is something particular you still want to address here. |
Fixes #767.