modularize steam
This commit is contained in:
		
							parent
							
								
									a09e88cf3e
								
							
						
					
					
						commit
						8b8aa68811
					
				
					 6 changed files with 30 additions and 18 deletions
				
			
		
							
								
								
									
										21
									
								
								home/modules/steam/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								home/modules/steam/default.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
{
 | 
			
		||||
  pkgs,
 | 
			
		||||
  lib,
 | 
			
		||||
  config,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
with lib; let
 | 
			
		||||
  cfg = config.local.apps.steam;
 | 
			
		||||
in {
 | 
			
		||||
  options.local.apps.steam = {
 | 
			
		||||
    enable = mkEnableOption "Steam settings";
 | 
			
		||||
  };
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    home.packages = [
 | 
			
		||||
      (pkgs.callPackage ./package.nix {})
 | 
			
		||||
      pkgs.protonup
 | 
			
		||||
      pkgs.winetricks
 | 
			
		||||
      pkgs.protontricks
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										9
									
								
								home/modules/steam/package.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								home/modules/steam/package.nix
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,9 @@
 | 
			
		|||
{
 | 
			
		||||
  writeShellScriptBin,
 | 
			
		||||
  steam-run,
 | 
			
		||||
  steam,
 | 
			
		||||
  ...
 | 
			
		||||
}:
 | 
			
		||||
writeShellScriptBin "steam" ''
 | 
			
		||||
  exec ${steam-run}/bin/steam-run ${steam}/bin/steam -console
 | 
			
		||||
''
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue