DEVELOPMENT ENVIRONMENT

~liljamo/nix-arta

ref: f29a7c500704f5df0716084750d3ed0f9dec5176 nix-arta/roles/steam.nix -rw-r--r-- 1.2 KiB
f29a7c50Jonni Liljamo feat(roles/steam, hosts/arwen): steam role and enable for arwen 4 months 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
  config,
  lib,
  pkgs,
  ...
}: let
  cfg = config.roles.steam;
in {
  options.roles.steam = {
    enable = lib.mkEnableOption "";
  };

  config = lib.mkIf cfg.enable {
    nixpkgs.config.allowUnfreePredicate = pkg:
      builtins.elem (lib.getName pkg) [
        "steam-run"
        "steam-original"
        "steam"
      ];

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

    environment.systemPackages = with pkgs; [
      gamescope
      protontricks
      gnome.zenity
    ];

    hm = {
      programs.mangohud = {
        enable = true;
        enableSessionWide = false;
        settings = {
          fps_limit = "60,90,120,200";
          time = true;

          gpu_stats = true;
          gpu_temp = true;
          gpu_text = "GPU";

          cpu_stats = true;
          cpu_temp = true;
          cpu_text = "CPU";

          vram = true;
          ram = true;

          fps = true;
          frametime = true;
          frame_timing = true;
          show_fps_limit = true;
        };
      };
    };
  };
}