blob: 80a45e820957727566fc9ccc7d4fc91e75d882a0 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.options.trivium.trash.steam;
in {
options.trivium.trash.steam = {
enable = mkEnableOption "steam settings";
compatibilityPackages = mkOption {
type = types.bool;
default = true;
description = "Enable additional compatibility packages (protontricks, protonup, etc.)";
};
remotePlayOpenFirewall = mkOption {
type = types.bool;
default = false;
description = "Open firewall for Steam Remote Play";
};
dedicatedServerOpenFirewall = mkOption {
type = types.bool;
default = false;
description = "Open firewall for Steam Dedicated Server";
};
localNetworkGameTransfersOpenFirewall = mkOption {
type = types.bool;
default = false;
description = "Open firewall for Steam Local Network Game Transfers";
};
};
config = mkIf cfg.enable {
programs.steam = {
enable = true;
remotePlay.openFirewall = cfg.remotePlayOpenFirewall;
dedicatedServer.openFirewall = cfg.dedicatedServerOpenFirewall;
localNetworkGameTransfers.openFirewall = cfg.localNetworkGameTransfersOpenFirewall;
};
environment = mkIf cfg.compatibilityPackages {
systemPackages = with pkgs; [
protontricks
protonup
protonup-ng
winetricks
];
};
};
}
|