aboutsummaryrefslogtreecommitdiff
path: root/modules/nixos/steam/default.nix
blob: d708139c26ef1704ed731511a8bad7a69445dc5e (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
{
  config,
  lib,
  pkgs,
  ...
}:
let
  inherit (lib) mkEnableOption mkIf;
  cfg = config.nx.steam;
in
{
  options.nx.steam = {
    enable = mkEnableOption "Steam gaming platform";
    protontricks = mkEnableOption "protontricks" // {
      default = true;
    };
    gamescope = mkEnableOption "gamescope session compositor";
  };

  config = mkIf cfg.enable {
    programs.steam = {
      enable = true;
      protontricks.enable = cfg.protontricks;
      gamescopeSession.enable = cfg.gamescope;
      extraCompatPackages = [ pkgs.proton-ge-bin ];
    };
  };
}