| 
									
										
										
										
											2022-12-05 22:53:04 +01:00
										 |  |  | # Podman related settings | 
					
						
							|  |  |  | { config, inputs, lib, options, pkgs, ... }: | 
					
						
							|  |  |  | let | 
					
						
							|  |  |  |   cfg = config.my.system.podman; | 
					
						
							|  |  |  | in | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   options.my.system.podman = with lib; { | 
					
						
							|  |  |  |     enable = mkEnableOption "podman configuration"; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   config = lib.mkIf cfg.enable { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     environment.systemPackages = with pkgs; [ | 
					
						
							|  |  |  |       podman-compose | 
					
						
							|  |  |  |     ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     virtualisation.podman = { | 
					
						
							|  |  |  |       enable = true; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       # Use fake `docker` command to redirect to `podman` | 
					
						
							|  |  |  |       dockerCompat = true; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       # Expose a docker-like socket | 
					
						
							|  |  |  |       dockerSocket.enable = true; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       # Allow DNS resolution in the default network | 
					
						
							|  |  |  |       defaultNetwork.dnsname.enable = true; | 
					
						
							| 
									
										
										
										
											2022-12-25 12:22:51 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-08 00:53:02 +01:00
										 |  |  |       # TODO enable in NixOS 23.05 | 
					
						
							| 
									
										
										
										
											2022-12-25 12:22:51 +01:00
										 |  |  |       # autoPrune.enable = true; | 
					
						
							| 
									
										
										
										
											2022-12-05 22:53:04 +01:00
										 |  |  |     }; | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | } |