aboutsummaryrefslogtreecommitdiff
path: root/modules/hosts/steam/default.nix
blob: 05a3703a088b72eb9a84182bbf2af1e204a053b0 (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
30
31
32
33
34
35
36
37
38
39
{
  config,
  pkgs,
  lib,
  ...
}:
let
  cfg = config.nx.steam;
  inherit (lib) mkOption types mkIf;
in
{
  options.nx.steam = {
    enable = mkOption {
      description = "Digital distribution platfrom from vavle";
      type = types.bool;
      default = false;
    };
    useProtontricks = mkOption {
      description = "Whether to enable protontricks";
      type = types.bool;
      default = true;
    };
    useGamescope = mkOption {
      description = "SteamOS session compositing window manager";
      type = types.bool;
      default = false;
    };
  };
  config = mkIf cfg.enable {
    programs.steam = {
      enable = true;
      protontricks.enable = cfg.useProtontricks;
      gamescopeSession.enable = cfg.useGamescope;
      extraCompatPackages = with pkgs; [
        proton-ge-bin
      ];
    };
  };
}