modularize audio
This commit is contained in:
		
							parent
							
								
									1221aaf0fc
								
							
						
					
					
						commit
						01f1576b8a
					
				
					 3 changed files with 31 additions and 15 deletions
				
			
		
							
								
								
									
										29
									
								
								sys/modules/audio.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								sys/modules/audio.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| { | ||||
|   config, | ||||
|   lib, | ||||
|   pkgs, | ||||
|   ... | ||||
| }: | ||||
| with lib; let | ||||
|   cfg = config.local.sys.audio; | ||||
| in { | ||||
|   options.local.sys.audio = { | ||||
|     enable = mkEnableOption "audio settings"; | ||||
|   }; | ||||
|   config = mkIf cfg.enable { | ||||
|     security.rtkit.enable = true; | ||||
| 
 | ||||
|     services.pipewire = { | ||||
|       enable = true; | ||||
| 
 | ||||
|       alsa = { | ||||
|         enable = true; | ||||
|         support32Bit = true; | ||||
|       }; | ||||
| 
 | ||||
|       jack.enable = true; | ||||
|       pulse.enable = true; | ||||
|       wireplumber.enable = true; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
|  | @ -7,5 +7,6 @@ | |||
|   imports = [ | ||||
|     ./baseline.nix | ||||
|     ./yubikey.nix | ||||
|     ./audio.nix | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
|  | @ -16,6 +16,7 @@ | |||
|     baseline.enable = true; | ||||
| 
 | ||||
|     yubikey.enable = true; | ||||
|     audio.enable = true; | ||||
|   }; | ||||
| 
 | ||||
|   # Use the systemd-boot EFI boot loader. | ||||
|  | @ -50,21 +51,6 @@ | |||
| 
 | ||||
|   hardware.graphics.enable = true; | ||||
| 
 | ||||
|   security.rtkit.enable = true; | ||||
| 
 | ||||
|   services.pipewire = { | ||||
|     enable = true; | ||||
| 
 | ||||
|     alsa = { | ||||
|       enable = true; | ||||
|       support32Bit = true; | ||||
|     }; | ||||
| 
 | ||||
|     jack.enable = true; | ||||
|     pulse.enable = true; | ||||
|     wireplumber.enable = true; | ||||
|   }; | ||||
| 
 | ||||
|   users = { | ||||
|     users.fabian = { | ||||
|       isNormalUser = true; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue