Files
nixos-servers/docs/plans/media-pc-replacement.md
Torjus Håkestad 8a5aa1c4f5
Some checks failed
Run nix flake check / flake-check (push) Failing after 4m30s
plans: add media PC replacement plan, update router hardware candidates
New plan for replacing the media PC (i7-4770K/Ubuntu) with a NixOS mini PC
running Kodi. Router plan updated with specific AliExpress hardware options
and IDS/IPS considerations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 23:54:29 +01:00

8.6 KiB

Media PC Replacement

Overview

Replace the aging Linux+Kodi media PC connected to the TV with a modern, compact solution. Primary use cases are Jellyfin/Kodi playback and watching Twitch/YouTube. The current machine (media, 10.69.31.50) is on VLAN 31.

Current State

Hardware

  • CPU: Intel Core i7-4770K @ 3.50GHz (Haswell, 4C/8T, 2013)
  • GPU: Nvidia GeForce GT 710 (Kepler, GK208B)
  • OS: Ubuntu 22.04.5 LTS (Jammy)
  • Software: Kodi
  • Network: media.home.2rjus.net at 10.69.31.50 (VLAN 31)

Control & Display

  • Input: Wireless keyboard (works well, useful for browser)
  • TV: 1080p (no 4K/HDR currently, but may upgrade TV later)
  • Audio: Surround system connected via HDMI ARC from TV (PC → HDMI → TV → ARC → surround)

Notes on Current Hardware

  • The i7-4770K is massively overpowered for media playback — it's a full desktop CPU from 2013
  • The GT 710 is a low-end passive GPU; supports NVDEC for H.264/H.265 hardware decode but limited to 4K@30Hz over HDMI 1.4
  • Ubuntu 22.04 is approaching EOL (April 2027) and is not managed by this repo
  • The whole system is likely in a full-size or mid-tower case — not ideal for a TV setup

Integration

  • Media source: Jellyfin on jelly01 (10.69.13.14) serves media from NAS via NFS
  • DNS: A record in services/ns/external-hosts.nix
  • Not managed: Not a NixOS host in this repo, no monitoring/auto-updates

Options

Option 1: Dedicated Streaming Device (Apple TV / Nvidia Shield)

Aspect Apple TV 4K Nvidia Shield Pro
Price ~$130-180 ~$200
Jellyfin Swiftfin app (good) Jellyfin Android TV (good)
Kodi Not available (tvOS) Full Kodi support
Twitch Native app Native app
YouTube Native app Native app
HDR/DV Dolby Vision + HDR10 Dolby Vision + HDR10
4K Yes Yes
Form factor Tiny, silent Small, silent
Remote Excellent Siri remote Decent, supports CEC
Homelab integration None Minimal (Plex/Kodi only)

Pros:

  • Zero maintenance - appliance experience
  • Excellent app ecosystem (native Twitch, YouTube, streaming services)
  • Silent, tiny form factor
  • Great remote control / CEC support
  • Hardware-accelerated codec support out of the box

Cons:

  • No NixOS management, monitoring, or auto-updates
  • Can't run arbitrary software
  • Jellyfin clients are decent but not as mature as Kodi
  • Vendor lock-in (Apple ecosystem / Google ecosystem)
  • No SSH access for troubleshooting

Option 2: NixOS Mini PC (Kodi Appliance)

A small form factor PC (Intel NUC, Beelink, MinisForum, etc.) running NixOS with Kodi as the desktop environment.

NixOS has built-in support:

  • services.xserver.desktopManager.kodi.enable - boots directly into Kodi
  • kodi-gbm package - Kodi with direct DRM/KMS rendering (no X11/Wayland needed)
  • kodiPackages.jellycon - Jellyfin integration for Kodi
  • kodiPackages.sendtokodi - plays streams via yt-dlp (Twitch, YouTube)
  • kodiPackages.inputstream-adaptive - adaptive streaming support

Example NixOS config sketch:

{ pkgs, ... }:
{
  services.xserver.desktopManager.kodi = {
    enable = true;
    package = pkgs.kodi.withPackages (p: [
      p.jellycon
      p.sendtokodi
      p.inputstream-adaptive
    ]);
  };

  # Auto-login to Kodi session
  services.displayManager.autoLogin = {
    enable = true;
    user = "kodi";
  };
}

Pros:

  • Full NixOS management (monitoring, auto-updates, vault, promtail)
  • Kodi is a proven TV interface with excellent remote/CEC support
  • JellyCon integrates Jellyfin library directly into Kodi
  • Twitch/YouTube via sendtokodi + yt-dlp or Kodi browser addons
  • Can run arbitrary services (e.g., Home Assistant dashboard)
  • Declarative, reproducible config in this repo

Cons:

  • More maintenance than an appliance
  • NixOS + Kodi on bare metal needs GPU driver setup (Intel iGPU is usually fine)
  • Kodi YouTube/Twitch addons are less polished than native apps
  • Need to buy hardware (~$150-400 for a decent mini PC)
  • Power consumption higher than a streaming device

Option 3: NixOS Mini PC (Wayland Desktop)

A mini PC running NixOS with a lightweight Wayland compositor, launching Kodi for media and a browser for Twitch/YouTube.

Pros:

  • Best of both worlds: Kodi for media, Firefox/Chromium for Twitch/YouTube
  • Full NixOS management
  • Can switch between Kodi and browser easily
  • Native web experience for streaming sites

Cons:

  • More complex setup (compositor + Kodi + browser)
  • Harder to get a good "10-foot UI" experience
  • Keyboard/mouse may be needed alongside remote
  • Significantly more maintenance

Comparison

Criteria Dedicated Device NixOS Kodi NixOS Desktop
Maintenance None Low Medium
Media experience Excellent Excellent Good
Twitch/YouTube Excellent (native apps) Good (addons/yt-dlp) Excellent (browser)
Homelab integration None Full Full
Form factor Tiny Small Small
Cost $130-200 $150-400 $150-400
Silent operation Yes Likely (fanless options) Likely
CEC remote Yes Yes (Kodi) Partial

Decision: NixOS Mini PC with Kodi (Option 2)

Rationale:

  • Already comfortable with Kodi + wireless keyboard workflow
  • Browser access for Twitch/YouTube is important — Kodi can launch a browser when needed
  • Homelab integration comes for free (monitoring, auto-updates, vault)
  • Natural fit alongside the other 16 NixOS hosts in this repo
  • Dedicated devices lose the browser/keyboard workflow

Twitch/YouTube in Kodi

Several approaches, can mix and match:

  • sendtokodi addon + yt-dlp — paste/send URLs, plays via yt-dlp backend. Supports Twitch and YouTube.
  • Kodi web browser — launch a full browser from within Kodi (falls back to keyboard input)
  • Tube addon / YouTube plugin — dedicated YouTube browsing within Kodi UI

The browser fallback with the wireless keyboard means streaming sites will always work even if Kodi addons are flaky.

Audio Passthrough

Kodi on NixOS supports HDMI audio passthrough for surround formats (AC3, DTS, etc.). The ARC chain (PC → HDMI → TV → ARC → surround) works transparently — Kodi just needs to be configured for passthrough rather than decoding audio locally.

Hardware

Leading Candidate: GMKtec G3

  • CPU: Intel N100 (Alder Lake-N, 4C/4T)
  • RAM: 16GB
  • Storage: 512GB NVMe
  • Price: NOK 2800 ($250 USD)
  • Source: AliExpress

The N100 supports hardware decode for all relevant 4K codecs:

Codec Support Used by
H.264/AVC Yes (Quick Sync) Older media
H.265/HEVC 10-bit Yes (Quick Sync) Most 4K media, HDR
VP9 Yes (Quick Sync) YouTube 4K
AV1 Yes (Quick Sync) YouTube, Twitch, newer encodes

16GB RAM is comfortable for Kodi + browser + NixOS system services (node-exporter, promtail, etc.) with plenty of headroom.

Key Requirements

  • HDMI 2.0+ for 4K future-proofing (current TV is 1080p)
  • Hardware video decode via VA-API / Intel Quick Sync
  • HDR support (for future TV upgrade)
  • Fanless or near-silent operation

Implementation Steps

  1. Choose and order hardware
  2. Create host configuration (hosts/media1/)
    • Kodi desktop manager with Jellyfin + streaming addons
    • Intel/AMD iGPU driver and VA-API hardware decode
    • HDMI audio passthrough for surround
    • NFS mount for media (same pattern as jelly01)
    • Browser package (Firefox/Chromium) for Twitch/YouTube fallback
    • Standard system modules (monitoring, promtail, vault, auto-upgrade)
  3. Install NixOS on the mini PC
  4. Configure Kodi (Jellyfin server, addons, audio passthrough)
  5. Update DNS - point media.home.2rjus.net to new IP (or keep on VLAN 31)
  6. Retire old media PC

Open Questions

  • What are the current media PC specs? — i7-4770K, GT 710, Ubuntu 22.04. Overkill CPU, weak GPU, large form factor. Not worth reusing if goal is compact/silent.
  • VLAN? — Keep on VLAN 31 for now, same as current media PC. Can revisit later.
  • Is CEC needed? — No, not using it currently. Can add later if desired.
  • Is 4K HDR output needed? — TV is 1080p now, but want 4K/HDR capability for future TV upgrade
  • Audio setup? — Surround system via HDMI ARC from TV. Media PC outputs HDMI to TV, TV passes audio to surround via ARC. Kodi/any player just needs HDMI audio output with surround passthrough.
  • Are there streaming service apps needed? — No. Only Twitch/YouTube, which work fine in any browser.
  • Budget? — ~NOK 2800 for GMKtec G3 (N100, 16GB, 512GB NVMe)