DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: 065f55257a7d1df9c0d2cc9257dbe813b65c0e9f nix-arta/roles/gaming/steam.nix -rw-r--r-- 983 bytes
065f5525Jonni Liljamo feat: LXC docs, base LXC, use NixOS LXC module a month 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
            # 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;
  };
}