summaryrefslogtreecommitdiff
path: root/modules/nixos/games/default.nix
blob: 585164e565542b22529d0f8846c8386110b19da7 (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
28
29
30
31
32
33
34
{ config, lib, ... }:
with lib;
let
  cfg = config.nixfiles.modules.games;
in
{
  imports = [
    ./gamemode.nix
    ./lutris.nix
    ./mangohud.nix
    ./minecraft.nix
    ./steam-run.nix
    ./steam.nix
  ];

  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;
    };
  };
}