c4a5515297
Mirror the hosts/common/features/gaming/ layout on the home side: turn the single gaming.nix into a gaming/ directory. Moonlight (the client counterpart to the Sunshine host) becomes moonlight.nix, gated by its own custom.gaming.moonlight option so a host can install just the streaming client without the full launcher/Proton toolkit (custom.gaming.enable). - gaming.nix -> gaming/default.nix (imports moonlight.nix) - gaming/moonlight.nix: custom.gaming.moonlight -> moonlight-qt - arrakis: import gaming module, set custom.gaming.moonlight = true (replaces the one-off home.packages line) - konishi: update import path to the directory Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
27 lines
824 B
Nix
27 lines
824 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
# Moonlight — client counterpart to the Sunshine host
|
|
# (hosts/common/features/gaming/sunshine.nix). User-space, so it lives here in
|
|
# the home gaming module rather than next to the Sunshine service.
|
|
#
|
|
# Gated by its own option, independent of `custom.gaming.enable`: a laptop can
|
|
# install just the streaming client without the full launcher/Proton toolkit.
|
|
#
|
|
# First run: launch `moonlight`, then pair to the Sunshine host by entering the
|
|
# PIN Moonlight shows into Sunshine's web UI (https://<host>:47990). Moonlight
|
|
# discovers hosts on the LAN via Sunshine's mDNS.
|
|
let
|
|
cfg = config.custom.gaming;
|
|
in
|
|
{
|
|
options.custom.gaming.moonlight = lib.mkEnableOption "Moonlight game-streaming client";
|
|
|
|
config = lib.mkIf cfg.moonlight {
|
|
home.packages = [ pkgs.moonlight-qt ];
|
|
};
|
|
}
|