nixos/containers: move libpod to nixos/podman

This commit is contained in:
zowoq
2020-04-24 15:34:05 +10:00
parent 5e6adf78e9
commit 0944d77fc0
3 changed files with 28 additions and 27 deletions
+26
View File
@@ -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;
};