nixos/{podman,containers}: libpod.conf -> containers.conf

This commit is contained in:
zowoq
2020-06-26 08:09:36 +10:00
parent 033ba9c73d
commit e89446656d
2 changed files with 29 additions and 24 deletions
@@ -34,6 +34,25 @@ in
'';
};
containersConf = mkOption {
default = {};
description = "containers.conf configuration";
type = types.submodule {
options = {
extraConfig = mkOption {
type = types.lines;
default = "";
description = ''
Extra configuration that should be put in the containers.conf
configuration file
'';
};
};
};
};
registries = {
search = mkOption {
type = types.listOf types.str;
@@ -93,6 +112,12 @@ in
config = lib.mkIf cfg.enable {
environment.etc."containers/containers.conf".text = ''
[network]
cni_plugin_dirs = ["${pkgs.cni-plugins}/bin/"]
'' + cfg.containersConf.extraConfig;
environment.etc."containers/registries.conf".source = toTOML "registries.conf" {
registries = lib.mapAttrs (n: v: { registries = v; }) cfg.registries;
};