summaryrefslogtreecommitdiffstats
path: root/modules/desktop/apps/games/steam.nix
blob: 50b5c628843aec14558a3c8bd950668824eabf53 (plain) (blame)
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
{
    config,
    options,
    lib,
    pkgs,
    ...
}: let
    gamesConf = config.modules.desktop.apps.games;
    configDir = config.nixosConfig.configDir;
in {
    options.modules.desktop.apps.games = {
        enable = lib.mkOption {
            type = lib.types.bool;
            default = false;
        };
        steam.enable = lib.mkOption {
            type = lib.types.bool;
            default = true;
        };
    };

    config = lib.mkIf (gamesConf.enable) {
        home.packages = [
            pkgs.steam-run
        ];

        programs.steam = lib.mkIf (gamesConf.steam.enable) {
            enable = true;
            remotePlay.openFirewall = true;
            dedicatedServer.openFirewall = true;
            gamescopeSession.enable = true;
        };
    };
}