ci / rust-arm64 (pull_request) Successful in 1m30s
apple / swift (pull_request) Successful in 1m59s
apple / distribute (pull_request) Skipped
apple / screenshots (pull_request) Skipped
ci / web (pull_request) Successful in 2m5s
ci / bun-nix (pull_request) Successful in 46s
ci / docs-site (pull_request) Successful in 1m25s
ci / docs-drift (pull_request) Successful in 46s
android / android (pull_request) Successful in 8m17s
ci / rust (pull_request) Successful in 22m6s
WP2 of the docs-and-onboarding overhaul (punktfunk-planning design/docs-and-onboarding-overhaul.md), stacked on #337 (WP0+WP1). Nav (meta.json) is now Get started / Guides / Switching from Sunshine / Reference / Troubleshooting. Get-started track, rewritten for someone with no Linux expertise — one task per page, happy path, under two minutes each: quickstart (5 steps), install (a pick-your-system hub), ubuntu, debian, fedora, arch, bazzite (+ a firewall step it was missing), a new nixos page (moved out of install), pairing. Every distro page quotes its install snippet through a new <Install platform="…"/> MDX component that reads docs-site/src/data/platforms.json — a byte-identical snapshot of data/platforms.json (the Docker build context is docs-site/ alone, same arrangement as openapi.json) which scripts/ci/check-docs-drift.sh now gates. <Ports/> renders the port table the same way on a new reference page, ports.mdx, so the four distro pages stop restating port lists. platforms.json itself was fixed while wiring it up: the apt snippet lacked the keyring lines, the winget one lacked `winget source add`, the Arch repo-add is now idempotent (grep guard — the documented double-append gotcha disappears at the source), names match the real floors (Ubuntu 26.04+, Windows 11 22H2+), a web-console port entry and the firewall profile names were added, and client platforms (Windows MSIX, macOS, TestFlight, Play, Steam Deck) so the website can render its cards from the same file. Dense material moved down rather than deleted: build-from-source.md (the three distro appendices), the Mint/LMDE/Cinnamon analysis → requirements.md, TOFU/`--open` → security.md, Secure Boot MOK paths and the Arch libavcodec soname refusal → troubleshooting, sysext channels/rollback/rebase → updating.md, the 0.28.1 cert note → windows-host. New page switching-from-sunshine.md: coexistence via the 47990 move (PUNKTFUNK_MGMT_BIND), the Windows display-topology overlap, detect-conflicts exit semantics (1 only for an active host — the troubleshooting page said "non-zero if any"), what maps to what, migration steps. The troubleshooting Sunshine section is tightened and points there. The three facts whose only home was a README now live in troubleshooting — the ffmpeg-libs weak dependency (no NVENC on Fedora), the pacman double-append error, the ds_inhibit SELinux storm with DualSense pads on Bazzite — and packaging/bazzite + packaging/arch READMEs are pointers. Stale claims corrected against the tree: the packaged unit runs the native-only `serve` and GameStream is opt-in on every route (kde, hyprland, security, steamos-host said otherwise); host.env is optional (EnvironmentFile=-); Fedora 43 uses the `bazzite` group; the iOS clipboard bridge exists; PUNKTFUNK_GAMESCOPE_SDR_NITS defaults to 203. Guides trimmed for verbosity (~5% by words — they are fact-dense; every heading, command, number, env var and link target is preserved, verified by token-inventory diffs). Tooling: docs-site README and CONTRIBUTING describe the platforms snapshot; input/uninstall/support-matrix links retargeted. Verified: check-docs-drift.sh and check-docs-links.sh green, docs-site `bun run build` + `bun run lint` green, and the built site served locally to confirm every cross-page anchor the rewrite links to (37) renders, plus the <Install/> blocks and the <Ports/> table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
77 lines
3.4 KiB
Plaintext
77 lines
3.4 KiB
Plaintext
---
|
|
title: NixOS
|
|
description: Install the Punktfunk host on NixOS from the repo's flake — add the binary cache, import the module, enable the host.
|
|
---
|
|
|
|
The repo's `flake.nix` builds `punktfunk-host`, `punktfunk-client`, `punktfunk-web` and
|
|
`punktfunk-scripting` and ships a NixOS module. **`x86_64-linux` only**, NixOS **24.11 or newer**.
|
|
|
|
## 1. Add the binary cache
|
|
|
|
Without it a build compiles the whole Rust workspace *and* gamescope from source — about an hour.
|
|
With it you get prebuilt binaries:
|
|
|
|
```nix
|
|
nix.settings = {
|
|
substituters = [ "https://nix.unom.io" ];
|
|
trusted-public-keys = [ "punktfunk-cache-1:yhOJmHxzg6tzXpxSFzlYn6Pc6r0jHprsWqt8MZC654o=" ]; # curl https://nix.unom.io/punktfunk-cache.pub
|
|
};
|
|
```
|
|
|
|
Off NixOS, put the same two values in `/etc/nix/nix.conf` as `extra-substituters` /
|
|
`extra-trusted-public-keys`. One trap: setting `inputs.punktfunk.inputs.nixpkgs.follows = "nixpkgs"`
|
|
changes every store path and misses the cache entirely —
|
|
[packaging/nix](https://git.unom.io/unom/punktfunk/src/branch/main/packaging/nix/README.md#binary-cache-do-this-before-your-first-build).
|
|
|
|
## 2. Import the module and enable the host
|
|
|
|
<Install platform="nixos" />
|
|
|
|
A typical host block:
|
|
|
|
```nix
|
|
services.punktfunk.host = {
|
|
enable = true;
|
|
users = [ "alice" ]; # added to the `input` group, for virtual gamepads
|
|
openFirewall = true;
|
|
desktopSession = true; # on a machine you log into — see below
|
|
settings = { RUST_LOG = "info"; }; # these become host.env
|
|
};
|
|
```
|
|
|
|
The module does declaratively what the deb/RPM scriptlets do — the systemd user services, udev
|
|
rules, kernel modules, sysctl tuning, the firewall ports and `input` group membership — and brings
|
|
the web console in alongside the host. `settings` writes `host.env` for you.
|
|
|
|
**Set `desktopSession = true` on any machine somebody logs into.** It ties the host to
|
|
`graphical-session.target`, so restarting Plasma or GNOME restarts the host with it; without it the
|
|
host keeps running against a compositor that no longer exists and fails capture on every later
|
|
session. Leave it off for the headless appliance route (a pinned compositor or a gamescope box),
|
|
which may never reach that target — same reasoning as
|
|
[Restart the host with your desktop](/docs/running-as-a-service#restart-the-host-with-your-desktop).
|
|
|
|
## 3. Start it
|
|
|
|
The host and console user services are defined but not started (set `autoStart = true` for an
|
|
appliance). From your graphical session:
|
|
|
|
```sh
|
|
systemctl --user enable --now punktfunk-host punktfunk-web
|
|
```
|
|
|
|
The plugin runner needs no such step — the module starts it, because the game-library scanners ship
|
|
as plugins (`services.punktfunk.scripting.autoStart = false;` to opt out).
|
|
|
|
**That's the install.** Continue with the [Quick Start from step 3](/docs/quickstart#3-open-the-web-console)
|
|
— open the console, pair a client, stream.
|
|
|
|
## When you want more
|
|
|
|
- **Run it without NixOS** (other distros, wrapped in [nixGL](https://github.com/nix-community/nixGL)
|
|
so the GPU drivers resolve): `nix run git+https://git.unom.io/unom/punktfunk#punktfunk-host -- serve`.
|
|
- The full option reference — client, console and scripting options, GPU driver notes, headless
|
|
appliance setup — is in
|
|
[packaging/nix](https://git.unom.io/unom/punktfunk/src/branch/main/packaging/nix/README.md).
|
|
- Updating: `nix flake update punktfunk` in your flake directory, then `sudo nixos-rebuild switch`
|
|
([Updating](/docs/updating)). Removing: [Uninstall](/docs/uninstall#nixos).
|