nixos/cri-o: share registries with nixos/containers

This commit is contained in:
zowoq 2020-04-24 15:57:10 +10:00
parent 320edf21f5
commit b464d76126
2 changed files with 9 additions and 9 deletions

View File

@ -45,6 +45,11 @@
There is a new module for Podman(<varname>virtualisation.podman</varname>), a drop-in replacement for the Docker command line. There is a new module for Podman(<varname>virtualisation.podman</varname>), a drop-in replacement for the Docker command line.
</para> </para>
</listitem> </listitem>
<listitem>
<para>
The new <varname>virtualisation.containers</varname> module manages configuration shared by the CRI-O and Podman modules.
</para>
</listitem>
</itemizedlist> </itemizedlist>
</section> </section>

View File

@ -6,6 +6,10 @@ let
cfg = config.virtualisation.cri-o; cfg = config.virtualisation.cri-o;
in in
{ {
imports = [
(mkRenamedOptionModule [ "virtualisation" "cri-o" "registries" ] [ "virtualisation" "containers" "registries" "search" ])
];
meta = { meta = {
maintainers = lib.teams.podman.members; maintainers = lib.teams.podman.members;
}; };
@ -36,12 +40,6 @@ in
default = "/pause"; default = "/pause";
description = "Pause command to be executed"; description = "Pause command to be executed";
}; };
registries = mkOption {
type = types.listOf types.str;
default = [ "docker.io" "quay.io" ];
description = "Registries to be configured for unqualified image pull";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -57,9 +55,6 @@ in
[crio.image] [crio.image]
pause_image = "${cfg.pauseImage}" pause_image = "${cfg.pauseImage}"
pause_command = "${cfg.pauseCommand}" pause_command = "${cfg.pauseCommand}"
registries = [
${concatMapStringsSep ", " (x: "\"" + x + "\"") cfg.registries}
]
[crio.network] [crio.network]
plugin_dirs = ["${pkgs.cni-plugins}/bin/"] plugin_dirs = ["${pkgs.cni-plugins}/bin/"]