summaryrefslogtreecommitdiff
path: root/modules/nixos/games/steam.nix
blob: 7262d7f4f507897302b57a1d4f23b69a09f24f41 (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
{
  config,
  lib,
  pkgs,
  ...
}:
with lib; let
  cfg = config.nixfiles.modules.games.steam;
in {
  options.nixfiles.modules.games.steam.enable =
    mkEnableOption "Steam runtime";

  config = mkIf cfg.enable {
    nixfiles.modules = {
      common.nix.allowedUnfreePackages = ["steam" "steam-original"];

      games = {
        enable32BitSupport = true;
        gamemode.enable = true;
        mangohud.enable = true;
      };
    };

    hm.home.packages = with pkgs; [
      (steam.override {extraEnv.MANGOHUD = 1;})
      protontricks
    ];
  };
}