nixos/podman: use shared config drvs to populate podman module

This commit is contained in:
Phillip Cloud 2021-01-09 09:52:32 -05:00
parent ca2aa77d7b
commit a873cbc218

View File

@ -2,7 +2,6 @@
let let
cfg = config.virtualisation.podman; cfg = config.virtualisation.podman;
toml = pkgs.formats.toml { }; toml = pkgs.formats.toml { };
nvidia-docker = pkgs.nvidia-docker.override { containerRuntimePath = "${pkgs.runc}/bin/runc"; };
inherit (lib) mkOption types; inherit (lib) mkOption types;
@ -100,8 +99,8 @@ in
containersConf.extraConfig = lib.optionalString cfg.enableNvidia containersConf.extraConfig = lib.optionalString cfg.enableNvidia
(builtins.readFile (toml.generate "podman.nvidia.containers.conf" { (builtins.readFile (toml.generate "podman.nvidia.containers.conf" {
engine = { engine = {
conmon_env_vars = [ "PATH=${lib.makeBinPath [ nvidia-docker ]}" ]; conmon_env_vars = [ "PATH=${lib.makeBinPath [ pkgs.nvidia-podman ]}" ];
runtimes.nvidia = [ "${nvidia-docker}/bin/nvidia-container-runtime" ]; runtimes.nvidia = [ "${pkgs.nvidia-podman}/bin/nvidia-container-runtime" ];
}; };
})); }));
}; };