refactor: flake dir -> outputs/sys -> nixos
This commit is contained in:
		
							parent
							
								
									3615bb010f
								
							
						
					
					
						commit
						a6d5e892a1
					
				
					 73 changed files with 9 additions and 2 deletions
				
			
		
							
								
								
									
										69
									
								
								nixos/modules/roles/gaming/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								nixos/modules/roles/gaming/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,69 @@ | |||
| { lib, config, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   inherit (lib) mkIf; | ||||
|   inherit (builtins) elem; | ||||
|   steamFix = pkgs.steam.override { | ||||
|     extraPkgs = pkgs: with pkgs; [ | ||||
|       xorg.libXcursor | ||||
|       xorg.libXi | ||||
|       xorg.libXinerama | ||||
|       xorg.libXScrnSaver | ||||
|       libpng | ||||
|       libpulseaudio | ||||
|       libvorbis | ||||
|       stdenv.cc.cc.lib | ||||
|       libkrb5 | ||||
|       keyutils | ||||
|       mangohud | ||||
|       winetricks | ||||
|       protontricks | ||||
|       gtk3 | ||||
|       gtk3-x11 | ||||
|     ]; | ||||
|   }; | ||||
|   host = config.ooknet.host; | ||||
| in | ||||
| 
 | ||||
| { | ||||
|   config = mkIf (elem "gaming" host.function) { | ||||
|     hardware.opengl.extraPackages = [ pkgs.gamescope ]; | ||||
|     services.flatpak.enable = true; | ||||
|     programs = { | ||||
|       steam = { | ||||
|         enable = true; | ||||
|         package = steamFix; | ||||
|         extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ]; | ||||
|       }; | ||||
|       gamescope = { | ||||
|         enable = true; | ||||
|         capSysNice = true; | ||||
|       }; | ||||
|       gamemode = { | ||||
|         enable = true; | ||||
|         settings = { | ||||
|           general = { | ||||
|             renice = 15; | ||||
|             softrealtime = "auto"; | ||||
|           }; | ||||
|            custom = { | ||||
|             start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'"; | ||||
|             end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'"; | ||||
|           }; | ||||
|         }; | ||||
|       }; | ||||
|     }; | ||||
|     networking.firewall = { | ||||
|       allowedTCPPorts = [ 3074 ]; | ||||
|       allowedUDPPorts = [ | ||||
|         88 | ||||
|         500 | ||||
|         3074 | ||||
|         2075 | ||||
|         3544 | ||||
|         4500 | ||||
|       ]; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
| 
 | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue