forked from jan-leila/nix-config
		
	added enables to modules and made base module that imports all other modules
This commit is contained in:
		
							parent
							
								
									eaa19be741
								
							
						
					
					
						commit
						bf0686a14b
					
				
					 7 changed files with 79 additions and 55 deletions
				
			
		|  | @ -1,4 +1,4 @@ | |||
| {pkgs, ...}: { | ||||
| {...}: { | ||||
|   imports = []; | ||||
| 
 | ||||
|   nix = { | ||||
|  |  | |||
|  | @ -8,10 +8,7 @@ | |||
|     inputs.disko.nixosModules.disko | ||||
|     ../../enviroments/server | ||||
| 
 | ||||
|     ../../modules/hardware.nix | ||||
|     ../../modules/users.nix | ||||
|     ../../modules/desktop.nix | ||||
|     ../../modules/nix-development.nix | ||||
|     ../../modules | ||||
|   ]; | ||||
| 
 | ||||
|   nixpkgs.config.allowUnfree = true; | ||||
|  |  | |||
|  | @ -3,10 +3,7 @@ | |||
|     inputs.nixos-hardware.nixosModules.framework-11th-gen-intel | ||||
| 
 | ||||
|     ../../enviroments/client | ||||
|     ../../modules/hardware.nix | ||||
|     ../../modules/users.nix | ||||
|     ../../modules/desktop.nix | ||||
|     ../../modules/nix-development.nix | ||||
|     ../../modules | ||||
|   ]; | ||||
| 
 | ||||
|   nixpkgs.config.allowUnfree = true; | ||||
|  |  | |||
|  | @ -2,10 +2,7 @@ | |||
|   imports = [ | ||||
|     ../../enviroments/client | ||||
| 
 | ||||
|     ../../modules/hardware.nix | ||||
|     ../../modules/users.nix | ||||
|     ../../modules/desktop.nix | ||||
|     ../../modules/nix-development.nix | ||||
|     ../../modules | ||||
|   ]; | ||||
| 
 | ||||
|   nixpkgs.config.allowUnfree = true; | ||||
|  |  | |||
							
								
								
									
										8
									
								
								modules/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								modules/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | |||
| {...}: { | ||||
|   imports = [ | ||||
|     ./hardware.nix | ||||
|     ./users.nix | ||||
|     ./desktop.nix | ||||
|     ./nix-development.nix | ||||
|   ]; | ||||
| } | ||||
|  | @ -1,4 +1,16 @@ | |||
| {pkgs, ...}: { | ||||
| { | ||||
|   lib, | ||||
|   pkgs, | ||||
|   config, | ||||
|   ... | ||||
| }: { | ||||
|   options.host.desktop.enable = lib.mkEnableOption "should desktop configuration be enabled"; | ||||
| 
 | ||||
|   config = lib.mkMerge [ | ||||
|     { | ||||
|       host.desktop.enable = lib.mkDefault true; | ||||
|     } | ||||
|     (lib.mkIf config.host.desktop.enable { | ||||
|       services = { | ||||
|         # Enable CUPS to print documents. | ||||
|         printing.enable = true; | ||||
|  | @ -38,4 +50,6 @@ | |||
| 
 | ||||
|       # enable RealtimeKit for pulse audio | ||||
|       security.rtkit.enable = true; | ||||
|     }) | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
|  | @ -1,8 +1,17 @@ | |||
| { | ||||
|   inputs, | ||||
|   lib, | ||||
|   config, | ||||
|   pkgs, | ||||
|   inputs, | ||||
|   ... | ||||
| }: { | ||||
|   options.host.nix-development.enable = lib.mkEnableOption "should desktop configuration be enabled"; | ||||
| 
 | ||||
|   config = lib.mkMerge [ | ||||
|     { | ||||
|       host.nix-development.enable = lib.mkDefault true; | ||||
|     } | ||||
|     (lib.mkIf config.host.nix-development.enable { | ||||
|       nix = { | ||||
|         nixPath = ["nixpkgs=${inputs.nixpkgs}"]; | ||||
|       }; | ||||
|  | @ -11,4 +20,6 @@ | |||
|         # nix langauge server | ||||
|         nixd | ||||
|       ]; | ||||
|     }) | ||||
|   ]; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue