neko: use real xfce image (software render), drop nonexistent nvidia-xfce + GPU

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
rope 2026-06-25 10:35:51 +01:00
parent e199933dce
commit e5589907a3

View file

@ -8,18 +8,19 @@
# image (FROM the upstream nvidia-xfce base) instead of relying on a volume. # image (FROM the upstream nvidia-xfce base) instead of relying on a volume.
# Guild Wars' own data installs into the persistent /home/neko volume on first run. # Guild Wars' own data installs into the persistent /home/neko volume on first run.
# #
# GPU: uses the host's NVIDIA 535 driver via the container toolkit (CDI). The # Rendering is software-only (no GPU): neko doesn't ship a prebuilt NVIDIA Xfce
# Quadro M2000 does the GL rendering and NVENC video encode. If you ever see a # desktop image, and building one from nvidia-base is a big detour for a 2005
# black screen or no video, the NVIDIA capabilities exposed to the container # game. Wine renders via llvmpipe (software OpenGL) and neko encodes via x264 —
# (graphics + video) are the first thing to check — verify with: # both are heavily multithreaded and this box has 56 Xeon threads to spare, so
# docker run --rm --device=nvidia.com/gpu=all neko-gw:local nvidia-smi # Guild Wars is comfortably playable this way.
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
let let
# Wine-enabled image definition. Fed to `docker build` over stdin (see below) # Wine-enabled image definition. Fed to `docker build` over stdin (see below)
# so there's no build context — we have no COPY/ADD, and a Nix-store symlinked # so there's no build context — we have no COPY/ADD, and a Nix-store symlinked
# context dir breaks BuildKit's Dockerfile resolution. # context dir breaks BuildKit's Dockerfile resolution. Pinned to the v3.1
# series so the NEKO_MEMBER_*/NEKO_WEBRTC_* env schema below stays valid.
dockerfile = pkgs.writeText "neko-gw.Dockerfile" '' dockerfile = pkgs.writeText "neko-gw.Dockerfile" ''
FROM ghcr.io/m1k1o/neko/nvidia-xfce:latest FROM ghcr.io/m1k1o/neko/xfce:3.1
USER root USER root
RUN dpkg --add-architecture i386 \ RUN dpkg --add-architecture i386 \
&& apt-get update \ && apt-get update \
@ -32,8 +33,6 @@ in
config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") { config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") {
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
# Expose the host NVIDIA driver to containers via CDI (nvidia.com/gpu=all).
hardware.nvidia-container-toolkit.enable = true;
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/lib/neko 0755 root root -" "d /var/lib/neko 0755 root root -"
@ -66,9 +65,6 @@ in
# (systemd's own ExecStart parser would strip the inner double quotes). # (systemd's own ExecStart parser would strip the inner double quotes).
ExecStart = pkgs.writeShellScript "neko-run" '' ExecStart = pkgs.writeShellScript "neko-run" ''
exec ${pkgs.docker}/bin/docker run --rm --name neko \ exec ${pkgs.docker}/bin/docker run --rm --name neko \
--device=nvidia.com/gpu=all \
-e NVIDIA_VISIBLE_DEVICES=all \
-e NVIDIA_DRIVER_CAPABILITIES=all \
--shm-size=1g \ --shm-size=1g \
-p 127.0.0.1:8092:8080 \ -p 127.0.0.1:8092:8080 \
-p 59000:59000/udp \ -p 59000:59000/udp \