summaryrefslogtreecommitdiff
path: root/modules/games/default.nix
blob: dea9d3c7da15d1f9c80774d0f4ac5f2a54b14bb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{ config, lib, ... }:
with lib;
let
  cfg = config.nixfiles.modules.games;
in
{
  imports = attrValues (modulesIn ./.);

  options.nixfiles.modules.games.enable32BitSupport = mkEnableOption "support for games";

  config = mkIf cfg.enable32BitSupport {
    services = {
      jack.alsa.support32Bit = config.services.jack.alsa.enable;

      pipewire.alsa.support32Bit = config.services.pipewire.alsa.enable;
    };

    hardware = {
      opengl = mkIf config.hardware.opengl.enable {
        extraPackages32 = config.hardware.opengl.extraPackages;
        driSupport32Bit = config.hardware.opengl.driSupport;
      };

      pulseaudio.support32Bit = config.hardware.pulseaudio.enable;
    };
  };
}