add gamemode
This commit is contained in:
		
							parent
							
								
									9359b99b8a
								
							
						
					
					
						commit
						70e33b355c
					
				
					 2 changed files with 25 additions and 1 deletions
				
			
		| 
						 | 
					@ -2,7 +2,10 @@
 | 
				
			||||||
# your system.  Help is available in the configuration.nix(5) man page
 | 
					# your system.  Help is available in the configuration.nix(5) man page
 | 
				
			||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
 | 
					# and in the NixOS manual (accessible by running ‘nixos-help’).
 | 
				
			||||||
{ config, pkgs, inputs, ... }: {
 | 
					{ config, pkgs, inputs, ... }: {
 | 
				
			||||||
  imports = [ ./media-packages.nix ];
 | 
					  imports = [
 | 
				
			||||||
 | 
					    ./gamemode.nix
 | 
				
			||||||
 | 
					    ./media-packages.nix
 | 
				
			||||||
 | 
					  ];
 | 
				
			||||||
  packages.media-packages.enable = true;
 | 
					  packages.media-packages.enable = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Bootloader.
 | 
					  # Bootloader.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										21
									
								
								system/gamemode.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								system/gamemode.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					{ config, pkgs, inputs, ... }: {
 | 
				
			||||||
 | 
					  programs.gamemode.enable = true;
 | 
				
			||||||
 | 
					  programs.gamemode.enableRenice = true;
 | 
				
			||||||
 | 
					  programs.gamemode.settings = {
 | 
				
			||||||
 | 
					    general = {
 | 
				
			||||||
 | 
					      renice = 10;
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Warning: GPU optimisations have the potential to damage hardware
 | 
				
			||||||
 | 
					    gpu = {
 | 
				
			||||||
 | 
					      apply_gpu_optimisations = "accept-responsibility";
 | 
				
			||||||
 | 
					      gpu_device = 0;
 | 
				
			||||||
 | 
					      amd_performance_level = "high";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    custom = {
 | 
				
			||||||
 | 
					      start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
 | 
				
			||||||
 | 
					      end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue