File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1515 # gui
1616 ./browser.nix
1717 ./desktop.nix
18+ ./steam.nix
1819
1920 # cli + gui
2021 ./android.nix
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 1919
2020 programs = {
2121 android . enable = true ;
22+ steam . enable = true ;
2223 } ;
2324 } ;
2425
You can’t perform that action at this time.
0 commit comments