Skip to content

Commit ffae60a

Browse files
Revert "feat(modules/system)!: rm steam"
This reverts commit dde98cb.
1 parent 406477b commit ffae60a

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

modules/system/default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# gui
1616
./browser.nix
1717
./desktop.nix
18+
./steam.nix
1819

1920
# cli + gui
2021
./android.nix

modules/system/steam.nix

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
config,
3+
pkgs,
4+
lib,
5+
...
6+
}:
7+
let
8+
cfg = config.my.programs.steam;
9+
in
10+
{
11+
options.my.programs.steam = {
12+
enable = lib.mkEnableOption "Steam";
13+
};
14+
15+
config = lib.mkIf cfg.enable {
16+
programs = {
17+
steam = {
18+
enable = true;
19+
20+
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
21+
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
22+
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
23+
24+
gamescopeSession.enable = false;
25+
26+
extraCompatPackages = [ pkgs.proton-ge-bin ];
27+
};
28+
29+
# `gamescope -- %command%`
30+
# for mangohud `gamescope --mangoapp -- %command%`
31+
# for LD_PRELOAD `LD_PRELOAD="" gamescope -- %command%`
32+
gamescope = {
33+
enable = true;
34+
capSysNice = false;
35+
args = [
36+
"-f" # full screen
37+
"--mouse-sensitivity 1" # increase mouse speed
38+
"--force-grab-cursor"
39+
"--adaptive-sync"
40+
];
41+
};
42+
};
43+
44+
environment = {
45+
sessionVariables.PROTON_ENABLE_WAYLAND = 1;
46+
47+
systemPackages = with pkgs; [
48+
# `mangohud %command%`
49+
mangohud
50+
];
51+
};
52+
};
53+
}

profiles/gui/system.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
programs = {
2121
android.enable = true;
22+
steam.enable = true;
2223
};
2324
};
2425

0 commit comments

Comments
 (0)