From 0944d77fc07414a5b69e9d8f75dae6a54faedc2b Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Fri, 24 Apr 2020 15:28:06 +1000 Subject: nixos/containers: move libpod to nixos/podman --- nixos/modules/virtualisation/podman.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'nixos/modules/virtualisation/podman.nix') diff --git a/nixos/modules/virtualisation/podman.nix b/nixos/modules/virtualisation/podman.nix index 1486b96e41d1..41d50dc73084 100644 --- a/nixos/modules/virtualisation/podman.nix +++ b/nixos/modules/virtualisation/podman.nix @@ -54,6 +54,25 @@ in ''; }; + libpod = mkOption { + default = {}; + description = "Libpod configuration"; + type = types.submodule { + options = { + + extraConfig = mkOption { + type = types.lines; + default = ""; + description = '' + Extra configuration that should be put in the libpod.conf + configuration file + ''; + + }; + }; + }; + }; + }; config = lib.mkIf cfg.enable { @@ -70,8 +89,15 @@ in ] ++ lib.optional cfg.dockerCompat dockerCompat; + environment.etc."containers/libpod.conf".text = '' + cni_plugin_dir = ["${pkgs.cni-plugins}/bin/"] + cni_config_dir = "/etc/cni/net.d/" + + '' + cfg.libpod.extraConfig; + environment.etc."cni/net.d/87-podman-bridge.conflist".source = copyFile "${pkgs.podman.src}/cni/87-podman-bridge.conflist"; + # Enable common /etc/containers configuration virtualisation.containers.enable = true; }; -- cgit 1.4.1