move printing to nixosModules
This commit is contained in:
		
							parent
							
								
									a377c8e30b
								
							
						
					
					
						commit
						c0d650d54f
					
				
					 5 changed files with 23 additions and 17 deletions
				
			
		|  | @ -95,6 +95,7 @@ | |||
|         let | ||||
|           specialArgs = { | ||||
|             inherit device; | ||||
|             inherit (self) nixosModules; | ||||
|           }; | ||||
|         in | ||||
|         nixpkgs.lib.nixosSystem { | ||||
|  | @ -146,7 +147,12 @@ | |||
|       }; | ||||
| 
 | ||||
|       nixosModules = | ||||
|         (builtins.mapAttrs (m: _: import ./nixosModules/${m}) (builtins.readDir ./nixosModules)) | ||||
|         let | ||||
|           lib = nixpkgs.lib; | ||||
|         in | ||||
|         (lib.attrsets.mapAttrs' ( | ||||
|           m: _: lib.attrsets.nameValuePair (lib.strings.removeSuffix ".nix" m) (import ./nixosModules/${m}) | ||||
|         ) (builtins.readDir ./nixosModules)) | ||||
|         // { | ||||
|           niri = { | ||||
|             imports = [ niri.nixosModules.niri ]; | ||||
|  |  | |||
|  | @ -1,8 +1,9 @@ | |||
| { nixosModules, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     ../../modules/gnome.nix | ||||
|     ../../modules/gaming.nix | ||||
|     ../../modules/printing.nix | ||||
|     nixosModules.printing | ||||
|     ../../modules/podman.nix | ||||
|     #../../modules/niri.nix | ||||
|     ../../modules/desktop-environment.nix | ||||
|  |  | |||
|  | @ -1,8 +1,9 @@ | |||
| { nixosModules, ... }: | ||||
| { | ||||
|   imports = [ | ||||
|     ../../modules/gnome.nix | ||||
|     ../../modules/gaming.nix | ||||
|     ../../modules/printing.nix | ||||
|     nixosModules.printing | ||||
|     ../../modules/podman.nix | ||||
|     #../../modules/niri.nix | ||||
|     ../../modules/desktop-environment.nix | ||||
|  |  | |||
|  | @ -1,14 +0,0 @@ | |||
| _: { | ||||
|   config = { | ||||
|     services = { | ||||
|       # Enable CUPS to print documents. | ||||
|       printing.enable = true; | ||||
| 
 | ||||
|       avahi = { | ||||
|         enable = true; # runs the Avahi daemon | ||||
|         nssmdns4 = true; # enables the mDNS NSS plug-in | ||||
|         openFirewall = true; # opens the firewall for UDP port 5353 | ||||
|       }; | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
							
								
								
									
										12
									
								
								nixosModules/printing.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								nixosModules/printing.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| { | ||||
|   services = { | ||||
|     # Enable CUPS to print documents. | ||||
|     printing.enable = true; | ||||
| 
 | ||||
|     avahi = { | ||||
|       enable = true; # runs the Avahi daemon | ||||
|       nssmdns4 = true; # enables the mDNS NSS plug-in | ||||
|       openFirewall = true; # opens the firewall for UDP port 5353 | ||||
|     }; | ||||
|   }; | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Vinzenz Schroeter
						Vinzenz Schroeter