Jovian NixOS Documentation

repository·development·Indexed 21 days ago

https://github.com/jovian-experiments/jovian-nixos

A collection of packages and configurations optimized for running NixOS on the Steam Deck or other x86_64 devices to provide a Steam Deck-like user experience. It includes modules for device-specific hardware, Steam Deck UI (Gaming Mode) integration, and tools like Decky Loader. The project recommends using the nixos-unstable channel for compatibility.

Tokens
2.7K
Snippets
12
Records
24
Agent score
76%

What's inside Jovian NixOS

  1. Understand the Jovian NixOS module organization

    development

    Jovian NixOS organizes its configuration options into several distinct namespaces. When extending or interacting with the system, you should identify which namespace your configuration belongs to:

    • devices/: Contains options specific to individual devices. New devices must prefix their namespace (both folder and options) with the vendor name.
    • hardware/: Contains hardware-specific options intended for a broad scope of devices. These options are typically gated behind hardware.has.* options.
    • steam/: Contains options that control the "steam deck mode" Steam interface.
    • steamos/: Contains opinionated configurations that mirror generic SteamOS settings but are not tied to a specific device.
    • jovian/: Contains miscellaneous and mostly internal options required for the Jovian NixOS system to function.
  2. Hardware compatibility for Jovian NixOS

    development

    Jovian NixOS includes specific configurations for gaming hardware.

    • Steam Deck: The Valve Steam Deck is a known supported device.
    • Other Hardware: While other computers work with standard NixOS, portable gaming devices may require specific Jovian NixOS modules.
    • AMD vs NVIDIA: The Steam Deck experience is developed on AMD hardware. Using other hardware, particularly NVIDIA hardware, may result in issues.
  3. Use the `jovian` prefix for custom NixOS options

    development

    Jovian-NixOS extends standard NixOS configurations by providing a set of extra options. To use these options in your NixOS configuration files, you must use the jovian prefix (e.g., jovian.<option_name>).

    Most of these options are implementation details and typically do not require modification. For the specific options relevant to users, refer to the Getting Started and Configuration documentation.

  4. Install NixOS for Jovian NixOS

    development

    To use Jovian NixOS, you must first install NixOS. The project currently only supports the unstable channel.

    Requirements & Tips:

    • Channel: Use the unstable channel only.
    • Input Methods: Ensure you have a way to type commands (e.g., a keyboard) during setup.
    • Boot Media: You can use an SD card to boot installation media to save USB ports.
    • Encryption: If using Full-Disk Encryption (FDE), be aware that the lack of a physical keyboard on some devices might complicate entering decryption keys.
  5. Manually start Gaming Mode (Steam Deck UI)

    development

    You can manually enter Gaming Mode (the Steam Deck UI) using one of two methods:

    1. From the Display Manager: Select "Gaming Mode" from the session selection menu.
    2. From a Virtual Terminal (VT): Run the start-gamescope-session command.
    3. From an existing desktop session: Launch gamescope-session. Note that running this within an existing session executes gamescope in nested mode, which may result in higher latency.
  6. Configure Jovian NixOS modules in your NixOS configuration

    development

    To apply Jovian NixOS configurations, you must import the ./modules directory from the repository into your NixOS configuration.

    You can achieve this using several methods:

    Method 1: Using fetchTarball

    Use builtins.fetchTarball within your imports list. You must provide the specific Git revision hash and the corresponding sha256 hash.

    Method 2: Using Flakes

    You can use Nix Flakes to fetch the repository as an input.

    Method 3: Local Git Checkout

    If you are developing or hacking on Jovian NixOS, you can add the local path of your Git checkout directly to your imports.

    { 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"
        )
    
      /* ... */
      ];
    
      /* ... */
    }
  7. Configure Steam Deck hardware in NixOS

    development

    To enable Steam Deck-specific hardware configurations, import the ./modules directory from the jovian-nixos repository into your NixOS configuration and set the jovian.devices.steamdeck.enable option to true.

    # Import modules from the repository
    { ... }: import ./modules
    
    { config, pkgs, ... }: {
      # Enable Steam Deck hardware configurations
      jovian.devices.steamdeck.enable = true;
    }