DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: b175d4accd75af1c6d9b0403d921deebab342cd1 nix-arta/roles/gaming/steam.nix -rw-r--r-- 1002 bytes
b175d4acJonni Liljamo feat: move metrics 11 days ago
                                                                                
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
35
36
37
38
39
40
41
42
43
44
45
{
  config,
  lib,
  ...
}: let
  cfg = config.roles.gaming;
in {
  config = lib.mkIf cfg.steam.enable {
    arta.unfree.allow = [
      "steam-run"
      "steam-original"
      "steam"
    ];

    nixpkgs.config.packageOverrides = pkgs: {
      steam = pkgs.steam.override {
        extraPkgs = pkgs:
          with pkgs; [
            # For gamescope to work properly:
            # https://github.com/NixOS/nixpkgs/issues/162562#issuecomment-1523177264
            xorg.libXcursor
            xorg.libXi
            xorg.libXinerama
            xorg.libXScrnSaver
            libpng
            libpulseaudio
            libvorbis
            stdenv.cc.cc.lib
            libkrb5
            keyutils

            # Fallback fonts (e.g. for Don't Get Lost).
            liberation_ttf
          ];
      };
    };

    programs.steam = {
      enable = true;
      remotePlay.openFirewall = false;
      dedicatedServer.openFirewall = false;
    };
    hardware.steam-hardware.enable = true;
  };
}