Update NixDesk
This commit is contained in:
		
							parent
							
								
									99231d0d04
								
							
						
					
					
						commit
						759ebb3558
					
				
					 12 changed files with 182 additions and 103 deletions
				
			
		|  | @ -1,5 +1,6 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./desktop | ||||
|     ./hardware | ||||
|     ./programs | ||||
|     ./services | ||||
|  |  | |||
|  | @ -1,9 +1,9 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.sisyphus.services.desktop.gnome; | ||||
|   cfg = config.sisyphus.desktop.gnome; | ||||
| in { | ||||
|   options.sisyphus.services.desktop.gnome.enable = lib.mkEnableOption "GNOME"; | ||||
|   options.sisyphus.desktop.gnome.enable = lib.mkEnableOption "GNOME"; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     services.xserver = { | ||||
|  | @ -3,6 +3,7 @@ | |||
| let | ||||
|   cfg = config.sisyphus.hardware.nvidia; | ||||
| 
 | ||||
|   do-offloading = builtins.elem cfg.model [ "Quadro T2000" ]; | ||||
|   nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" '' | ||||
|     export __NV_PRIME_RENDER_OFFLOAD=1 | ||||
|     export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0 | ||||
|  | @ -35,24 +36,33 @@ in { | |||
|         open = true; | ||||
|         package = config.boot.kernelPackages.nvidiaPackages.stable; | ||||
|         modesetting.enable = true; | ||||
|         nvidiaSettings = config.sisyphus.hardware.nvidia.gui-settings; | ||||
|         nvidiaSettings = cfg.gui-settings; | ||||
|         powerManagement = { | ||||
|           enable = true; | ||||
|           finegrained = true; | ||||
|           enable = do-offloading; | ||||
|           finegrained = do-offloading; | ||||
|         }; | ||||
| 
 | ||||
|         prime = lib.mkIf (cfg.model == "Quadro T2000") { | ||||
|           offload = { | ||||
|             enable = true; | ||||
|             enableOffloadCmd = true; | ||||
|           }; | ||||
|           intelBusId = "PCI::00:02:0"; | ||||
|           nvidiaBusId = "PCI:01:00:0"; | ||||
|         }; | ||||
|         prime = lib.mkMerge [ | ||||
|           (lib.mkIf do-offloading { | ||||
|             offload = { | ||||
|               enable = true; | ||||
|               enableOffloadCmd = true; | ||||
|             }; | ||||
|           }) | ||||
|           (lib.mkIf (cfg.model == "Quadro T2000") { | ||||
|             intelBusId = "PCI::00:02:0"; | ||||
|             nvidiaBusId = "PCI:01:00:0"; | ||||
|           }) | ||||
|           (lib.mkIf (cfg.model == "RTX 2060") { | ||||
|             sync.enable = true; | ||||
|             intelBusId = "PCI::00:02:0"; | ||||
|             nvidiaBusId = "PCI:01:00:0"; | ||||
|           }) | ||||
|         ]; | ||||
|       }; | ||||
|     }; | ||||
| 
 | ||||
|     environment.systemPackages = lib.mkIf (cfg.model != "") [ | ||||
|     environment.systemPackages = lib.mkIf do-offloading [ | ||||
|       nvidia-offload | ||||
|     ]; | ||||
|   }; | ||||
|  |  | |||
|  | @ -1,7 +1,8 @@ | |||
| { | ||||
|   imports = [ | ||||
|     ./desktop | ||||
|     ./openrgb | ||||
|     ./openssh | ||||
|     ./pipewire | ||||
|     ./printing | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
							
								
								
									
										15
									
								
								nixos/modules/services/openrgb/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								nixos/modules/services/openrgb/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.sisyphus.services.openrgb; | ||||
| in { | ||||
|   options.sisyphus.services.openrgb.enable = lib.mkEnableOption "OpenRGB"; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     services.hardware.openrgb = { | ||||
|       enable = true; | ||||
|       package = pkgs.openrgb-with-all-plugins; | ||||
|       motherboard = "intel"; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										25
									
								
								nixos/modules/services/pipewire/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								nixos/modules/services/pipewire/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,25 @@ | |||
| { config, lib, pkgs, ... }: | ||||
| 
 | ||||
| let | ||||
|   cfg = config.sisyphus.services.pipewire; | ||||
| in { | ||||
|   options.sisyphus.services.pipewire.enable = lib.mkEnableOption "Pipewire"; | ||||
| 
 | ||||
|   config = lib.mkIf cfg.enable { | ||||
|     sound.enable = true; | ||||
|     hardware.pulseaudio.enable = false; | ||||
|     security.rtkit.enable = true; | ||||
|     services.pipewire = { | ||||
|       enable = true; | ||||
|       alsa.enable = true; | ||||
|       alsa.support32Bit = true; | ||||
|       pulse.enable = true; | ||||
|       # If you want to use JACK applications, uncomment this | ||||
|       #jack.enable = true; | ||||
| 
 | ||||
|       # use the example session manager (no others are packaged yet so this is enabled by default, | ||||
|       # no need to redefine it in your config for now) | ||||
|       #media-session.enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue