diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..2bb6cd62 --- /dev/null +++ b/CONTRIBUTING.md @@ -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/) diff --git a/README.md b/README.md index a0ae4858..58effb6e 100644 --- a/README.md +++ b/README.md @@ -1,113 +1,71 @@ -

Jovian NixOS

-
NixOS on the Steam Deck
+ +
+

Jovian NixOS

+
NixOS on the Steam Deck
+
+
+
+
-No other device-specific quirks or configuration handled for now. +
-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` +
-### `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. +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.” +
+
+
-> 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) diff --git a/docs/FAQ.md b/docs/FAQ.md new file mode 100644 index 00000000..fd8f1503 --- /dev/null +++ b/docs/FAQ.md @@ -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. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..9a76db68 --- /dev/null +++ b/docs/README.md @@ -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 diff --git a/docs/configuration.md b/docs/configuration.md new file mode 100644 index 00000000..e3f2a52e --- /dev/null +++ b/docs/configuration.md @@ -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. + diff --git a/docs/devices/valve-steam-deck/index.md b/docs/devices/valve-steam-deck/index.md new file mode 100644 index 00000000..abed8a14 --- /dev/null +++ b/docs/devices/valve-steam-deck/index.md @@ -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. diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 00000000..2e42b263 --- /dev/null +++ b/docs/getting-started.md @@ -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. diff --git a/docs/in-depth.md b/docs/in-depth.md new file mode 100644 index 00000000..f4f8a57b --- /dev/null +++ b/docs/in-depth.md @@ -0,0 +1,6 @@ +In-Depth +======== + +Learn more about: + + - [Using Decky Loader](in-depth/decky-loader.md) diff --git a/docs/in-depth/decky-loader.md b/docs/in-depth/decky-loader.md new file mode 100644 index 00000000..b7ccf2ba --- /dev/null +++ b/docs/in-depth/decky-loader.md @@ -0,0 +1,15 @@ +Decky Loader +============ + +> [!INFO] +> This page is a stub. + +To enable *Decky Loader* in your configuration: + +```nix +{ + jovian.decky-loader = { + enable = true; + }; +} +``` diff --git a/docs/options.md b/docs/options.md new file mode 100644 index 00000000..7212376d --- /dev/null +++ b/docs/options.md @@ -0,0 +1,10 @@ +# Options + +Jovian-NixOS adds a set of extra options that can be used in your NixOS configurations under the `jovian` prefix. + +
+ +> [!NOTE] +> The options listing is available on the website. + +
diff --git a/docs/steam.md b/docs/steam.md new file mode 100644 index 00000000..946a5111 --- /dev/null +++ b/docs/steam.md @@ -0,0 +1,52 @@ +Steam +===== + + +You can enable the Steam Deck version of the Steam client with: + +```nix +{ + jovian.steam.enable = true; +} +``` + +To manually start **Gaming Mode** (also known as the **Steam Deck UI**), there are two options: + +- 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. + +## Start On Boot + +To automatically launch Gaming Mode on boot and enable desktop switching from the power menu: + +```nix +{ + services.xserver.desktopManager.plasma5.enable = true; + + jovian.steam = { + enable = true; + autoStart = true; + user = "yourname"; + desktopSession = "plasma"; + }; +} +``` + + +## Troubleshooting + +Logs from Gaming Mode can be obtained with: + +```bash +journalctl --user -u steam-session.slice +``` + + +## Options + +
+ +> [!NOTE] +> The options listing is available on the website. + +