Gaming

#| file: modules/nixos/desktop/games.nix
{
  lib,
  config,
  pkgs,
  ...
}:
let
  cfg = config.mjm.desktop;
in
{
  options.mjm.desktop = {
    <<options>>
  };

  config = lib.mkIf (cfg.enable && cfg.games.enable) {
    <<config>>
  };

  _class = "nixos";
}

Options

games.enable = lib.mkOption {
  type = lib.types.bool;
  default = pkgs.stdenv.hostPlatform.isx86_64;
};

Games are enabled by default on desktop machines that use x86_64. This really just excludes my MacBook running Asahi Linux. As I understand it, it's technically possible to get Steam working on Asahi, but I don't think it's trivial to do on NixOS, so I haven't bothered.

Config

environment.systemPackages = lib.attrValues {
  inherit (pkgs)
    lutris
    piper
    wago
    xivlauncher
    ;
  inherit (pkgs.kdePackages) kmahjongg kmines;
};

I install various games and game-related tools that are available as standalone packages.

programs.steam.enable = true;
programs.steam.remotePlay.openFirewall = true;

Steam is of course where most of my games come from, so it gets installed. I have a Steam Link as well which I sometimes use to play things on the TV, so I want remote play to work.

services.ratbagd.enable = true;

ratbagd is a service that can be used to configure the mouse buttons on gaming mice. I have a Logitech G600 from when I used to regularly play FFXIV, so I have this installed to be able to work with that. The GUI tool Piper is installed above and uses ratbagd.

programs.obs-studio.enable = true;
programs.obs-studio.plugins = with pkgs.obs-studio-plugins; [
  obs-vkcapture
  obs-mute-filter
  input-overlay
];

I sometimes like to stream my gameplay to my PeerTube server, where it gets saved indefinitely. I use OBS Studio for this, with a handful of plugins.

Proxy Information
Original URL
gemini://midna.dev/homelab/modules/nixos/desktop/games.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-US
Capsule Response Time
23.394328 milliseconds
Gemini-to-HTML Time
0.155734 milliseconds

This content has been proxied by September (UNKNO).