Skip to content
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

docs: Add more docs #154

Merged
merged 15 commits into from
Sep 24, 2023
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Contributing to Jovian NixOS
============================

Development happens on the [GitHub Repository](https://github.com/Jovian-Experiments/Jovian-NixOS/).


Reporting issues
----------------

Yes, issues are contributions.

First, look around [in the opened and closed issues](https://github.com/Jovian-Experiments/Jovian-NixOS/issues?q=is%3Aissue+), someone might have reported the same issue.
In case of doubt or if it's not the same exact issue, feel free to [open a new issue](https://github.com/Jovian-Experiments/Jovian-NixOS/issues/new).

If you're not sure an issue is the same or not, especially an older closed issue, prefer opening a new issue, and in the issue tell us you suspect it could be related to that other issue.

First, identify if the issue not an upstream NixOS issue.
If it is not related to a device-specific issue (e.g. Steam Deck), to the Steam Deck UI integration, or to the few other system integration this repository handles, it is possibly a NixOS issue.
If you're unsure, it's okay to report it in the Jovian NixOS repository, at worst we'll explain how it's unrelated and ask you to report back to upstream and cross-reference.


Submitting changes
------------------

Opening [a Pull Request on the GitHub repository](https://github.com/NixOS/nixpkgs/pulls) is the preferred contribution workflow.

Though, if you can't, or don't want to, a properly `git format-patch` or `git send-email` contribution is fine too.
Find one or a few major contributor's e-mail address in the git repo, and send it there.

There are no strict guidelines.

- Changes that are not about hardware-specific quirks, the Steam Deck UI, or system integration thereof should preferably be sent to Nixpkgs.
- Implement as if you were contributing to Nixpkgs.
- Test your changes, and tell us what you did do, and what you did not do.


“AI”-assisted changes
---------------------

> [!NOTE]
> Using pre-existing **boilerplate**, **snippets**, or **syntax suggestions** from your IDE are not considered as “AI”-assisted changes.

Contributions written largely with help of LLMs (*Large Language Models*), other “AI” (or non-“AI”), or similar systems are not welcome.
Such systems of concern are generally using statistical models built on “knowledge” acquired for the purpose without express consent, and with disregard of the authorship and attribution.

This includes, but is not limited to:

- Using them to generate comments
- Using them to generate documentation
- Using them to generate code

Contributions should be largely authored by the people in the commit information, e.g. the `Committer,` `Author`, `Signed-off-by`, and `Co-authored-by` fields, exclusively.

If you are unsure, or you had help from automated “AI”-generation in *part* of your contribution, please tell us when contributing.
It does not mean the contribution will be rejected outright.
We will evaluate on a case-by-case basis.
We value honesty, and take it into consideration.


Other resources
---------------

- [The NixOS/Nixpkgs `CONTRIBUTING.md`](https://github.com/NixOS/nixpkgs/blob/master/CONTRIBUTING.md?)
- [The Nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable/)
- [The NixOS manual](https://nixos.org/manual/nixos/unstable/)
130 changes: 44 additions & 86 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,71 @@
<div align="center"><h1>Jovian NixOS</h1></div>
<div align="center"><strong><em>NixOS on the Steam Deck</em></strong></div>
<!--

****
NOTE: This page also serves as the index page of the website!!

A set of packages and configurations for running NixOS on the [Steam Deck](https://www.steamdeck.com).
This repo is also useful for obtaining a Deck-like experience on other `x86_64` devices.

Installation
------------

Use [the normal installation images](https://nixos.org/download.html#download-nixos) available on NixOS.org.

Prefer the `nixos-unstable` image, but you can also use the latest stable image as long as you use the `unstable` channel for the system.

When configuring the system, import `./modules` from this repo in your configuration.

### Steam Deck

To enter the boot menu, power off the Steam Deck then hold down `Volume-` and tap the `Power` button.
Its docs-folder-relative links will be rewritten accordingly.

When configuring the system, import `./modules` from this repo in your configuration and enable the Steam Deck-specific hardware configurations with `jovian.devices.steamdeck.enable = true;`.
HTML may be used to hide elements from the main website, be mindful about it.

### Other Devices
-->
<div class="for-github -title homepage-title">
<div align="center"><h1>Jovian NixOS</h1></div>
<div align="center"><strong><em>NixOS on the Steam Deck</em></strong></div>
</div>
<div class="for-github -unneeded">
<hr />
</div>

No other device-specific quirks or configuration handled for now.
<div class="homepage-hero">

Feel free to contribute one or more!
What is Jovian NixOS?
---------------------

Configuration
-------------

All available module options along with their descriptions can be found under `modules`.

To use the Steam Deck UI, set `jovian.steam.enable = true;` in your configuration.
This will only enable the Steam Deck UI tooling. To enable "desktop" steam, enable the usual NixOS options.
Then you can start the UI using one of the following methods:

- (**preferred**) Use `jovian.steam.autoStart = true;` to auto-start at login, and enabling use of *Switch to Desktop* option.
- Select "Gaming Mode" in the Display Manager or run `steam-session` in a VT.
- Launch `steam-session` within an existing desktop session. This will run [gamescope](https://github.com/Plagman/gamescope) in nested mode which results in higher latency.

If you want *Switch to Desktop* to switch to another session with `autoStart`, you will need to configure `jovian.steam.desktopSession`.
Configure it with the name of the X11 or wayland session of your choosing.
The *Switch to Desktop* option will not work with the other two methods of running the Steam Deck UI, instead if will close Steam.

Firmware Updates
----------------

### `steamdeck-firmware`
A set of packages and configurations for running NixOS on the [Steam Deck](https://www.steamdeck.com).

Updates to the BIOS and the controller are available in the `steamdeck-firmware` package:
This repo is also useful for obtaining a Steam Deck-like experience on other `x86_64` devices.

- BIOS: Run `sudo jupiter-biosupdate`
- Controller: Run `sudo jupiter-controller-update`
</div>

### `jupiter-dock-updater-bin`
<div class="for-github -unneeded">
<hr />
</div>

Updates to the Docking Station firmware are available in the `jupiter-dock-updater-bin` package.
Connect to the dock via USB-C and run `jupiter-dock-updater` to update.
Pointers to helpful pages
-------------------------

FAQs
----
- The [Getting Started](docs/getting-started.md) page may be your first stop.
- The [Configuration](docs/configuration.md) page guides you into configuring your system.
- The [Options](docs/options.md) is good to know all that you can do.

> **Jovian**
> “Relating to [...] Jupiter or the class of [...] which Jupiter belongs.”
<div class="for-github -unneeded">
<hr />
</div>

> What's Jupiter?
Who are we?
-----------

[There's a disambiguation page that won't help you](https://en.wikipedia.org/wiki/Jupiter_(disambiguation)).
I don't know *exactly* what it's the codename for.
It is either the codename for the Steam Deck, or the codename for the new Steam OS for the Steam Deck.
Things get awfully murky when you realize that *Neptune*'s also a thing, and it's unclear really from the outside, and quick searches don't provide *conclusive* evidence.
But to the best of my knowledge, Jupiter is the OS for us.
Most [contributors](https://github.com/Jovian-Experiments/Jovian-NixOS/graphs/contributors) here are also contributors to the [Nixpkgs, and NixOS Linux](https://github.com/NixOS/nixpkgs) ecosystem.

> What channels are supported?
We're a few peeps that want to keep their Steam Deck useful as a gaming device, while also benefiting from NixOS.

Truthfully, no channel is *supported*, but the older the stable release was cut, the more likely the additions from Jovian NixOS won't work as expected.

Thus, it is preferrable to use `nixos-unstable`. The latest update *should* work fine, and when it doesn't, it'll be handled soon enough.
Can I help?
-----------

* * *
Probably!

Importing the modules in your configuration
-------------------------------------------
See the [contributing](CONTRIBUTING.md) page.

One way to do so is by using `fetchTarball` in the `imports` of your configuration.

```nix
{ config, lib, pkgs, ... }:
How do I reach any of you?
--------------------------

{
imports = [
(
# Put the most recent revision here:
let revision = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; in
builtins.fetchTarball {
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${revision}.tar.gz";
# Update the hash as needed:
sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
} + "/modules"
)
For support, don't hesitate [to file an issue](https://github.com/Jovian-Experiments/Jovian-NixOS/issues), questions are accepted.

/* ... */
];
For chatting about the project [the matrix room at #Jovian-Experiments:matrix.org](https://matrix.to/#/#Jovian-Experiments:matrix.org) is where we hang out.

/* ... */
}
```
For other purposes, contact the developers via e-mail.

Another way is to use *Flakes*, or any other method to fetch inputs.
For obfuscation, see these raw commits which contain the relevant e-mail address at the top:

When hacking on Jovian NixOS things, adding the path to a Git checkout of this repo to `imports` works well too.
- [@samueldr (Samuel Dionne-Riel)](https://github.com/Jovian-Experiments/Jovian-NixOS/commit/af7041f1e92d6d4e1e04e6e4f9ec6e301d2b8e01.patch)
21 changes: 21 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FAQ
===

> **Jovian**
> “Relating to [...] Jupiter or the class of [...] which Jupiter belongs.”

> What's Jupiter?

[There's a disambiguation page that won't help you](https://en.wikipedia.org/wiki/Jupiter_(disambiguation)).
It's not known *exactly* what it's the codename for.
It is either the codename for the Steam Deck, or the codename for the new Steam OS for the Steam Deck.
Things get awfully murky with *Neptune* also being a thing, and it's unclear from the outside what it is.
To the best of our knowledge, Jupiter is the OS.

* * *

> What channels are supported?

Truthfully, no channel is *supported*, but the older the stable release was cut, the more likely the additions from Jovian NixOS won't work as expected.

Thus, it is preferable to use `nixos-unstable`. The latest update *should* work fine, and when it doesn't, it'll be handled soon enough.
4 changes: 4 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
> [!NOTE]
> This directory is the source for the documentation.
>
> This README page will be replaced by the main README file, and moved to index.md
20 changes: 20 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Configuration
=============

> [!INFO]
> This page is a stub.

All available module options along with their descriptions can be found under `modules`.

To use the Steam Deck UI, set `jovian.steam.enable = true;` in your configuration.
This will only enable the Steam Deck UI tooling. To enable "desktop" steam, enable the usual NixOS options.
Then you can start the UI using one of the following methods:

- (**preferred**) Use `jovian.steam.autoStart = true;` to auto-start at login, and enabling use of *Switch to Desktop* option.
- Select "Gaming Mode" in the Display Manager or run `steam-session` in a VT.
- Launch `steam-session` within an existing desktop session. This will run [gamescope](https://github.com/Plagman/gamescope) in nested mode which results in higher latency.

If you want *Switch to Desktop* to switch to another session with `autoStart`, you will need to configure `jovian.steam.desktopSession`.
Configure it with the name of the X11 or Wayland session of your choosing.
The *Switch to Desktop* option will not work with the other two methods of running the Steam Deck UI, instead it will close Steam.

31 changes: 31 additions & 0 deletions docs/devices/valve-steam-deck/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Steam Deck
==========

Configuration
-------------

When configuring the system, import `./modules` from this repo in your configuration and enable the Steam Deck-specific hardware configurations with `jovian.devices.steamdeck.enable = true;`.


Firmware Updates
----------------

Firmware update, at this time, is not handled automatically.

### `steamdeck-firmware`

Updates to the BIOS and the controller are available in the `steamdeck-firmware` package:

- BIOS: Run `sudo jupiter-biosupdate`
- Controller: Run `sudo jupiter-controller-update`

### `jupiter-dock-updater-bin`

Updates to the Docking Station firmware are available in the `jupiter-dock-updater-bin` package.
Connect to the dock via USB-C and run `jupiter-dock-updater` to update.


Helpful Tips
------------

To enter the boot menu, power off the Steam Deck then hold down `Volume-` and tap the `Power` button.
83 changes: 83 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
Getting Started
===============

Using Jovian NixOS requires *some* NixOS knowledge, ideally.
It's not a strict requirement, but will make your life easier, as this may make some NixOS peculiarities harder to deal with.


Installing NixOS
----------------

For now, this may be the "hardest" step, as it requires thinking ahead.
Note that you're free to install NixOS in any way you want.

Though here are the requirements:

- Only the `unstable` channel is supported.

Here are some tips:

- You will most likely need some way to type commands, e.g. a keyboard.
- You can use an SD card to boot the installation media, freeing-up the only USB port.
- Using a docking station sure is helpful, but not needed.
- FDE (full-disk encryption) may or may not be an issue, considering there is no physical keyboard.

Up to this moment, nothing here is specific to Jovian NixOS or the Steam Deck.


Configuring Jovian NixOS
------------------------

This is where the fun begins!


### Configuring for your hardware

This only applies if you have a "made for gaming" device like the Steam Deck, or other portable gaming devices.

Other computers are just boring computers, and mostly need nothing special here.
Note that since the Steam Deck experience is developed on AMD hardware, using [other hardware](https://github.com/Jovian-Experiments/Jovian-NixOS/labels/8.%20hardware%3A%20other) may have issues, especially [NVIDIA hardware](https://github.com/Jovian-Experiments/Jovian-NixOS/labels/8. hardware%3A NVIDIA).

**Known hardware**

- [Valve Steam Deck](devices/valve-steam-deck/index.md)

Feel free to contribute more for-gaming hardware-specific quirks!


### Configuring the software

> [!INFO]
> This section is a stub.

When configuring the system, import `./modules` from this repo in your configuration.

One way to do so is by using `fetchTarball` in the `imports` of your configuration.

```nix
{ config, lib, pkgs, ... }:

{
imports = [
(
# Put the most recent revision here:
let revision = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; in
builtins.fetchTarball {
url = "https://github.com/Jovian-Experiments/Jovian-NixOS/archive/${revision}.tar.gz";
# Update the hash as needed:
sha256 = "sha256:0000000000000000000000000000000000000000000000000000";
} + "/modules"
)

/* ... */
];

/* ... */
}
```

Another way is to use *Flakes*, or any other method to fetch inputs.

When hacking on Jovian NixOS things, adding the path to a Git checkout of this repo to `imports` works well too.

See the [Configuration](configuration.md) page for more information about configuration.
6 changes: 6 additions & 0 deletions docs/in-depth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
In-Depth
========

Learn more about:

- [Using Decky Loader](in-depth/decky-loader.md)
Loading
Loading