nixos/modules/virtualisation: fix oci-containers with docker

The empty attribute set is invalidly provided as service config and
results in evaluation error.
This commit is contained in:
Karel Kočí 2022-10-17 16:11:56 +02:00
parent 44f236e33f
commit 76e1e908c1
No known key found for this signature in database
GPG key ID: D83BD732AC2BD828

View file

@ -304,12 +304,13 @@ let
# ExecReload = ...;
###
Environment=if cfg.backend == "podman" then "PODMAN_SYSTEMD_UNIT=podman-${name}.service" else {};
Type=if cfg.backend == "podman" then "notify" else {};
NotifyAccess=if cfg.backend == "podman" then "all" else {};
TimeoutStartSec = 0;
TimeoutStopSec = 120;
Restart = "always";
} // optionalAttrs (cfg.backend == "podman") {
Environment="PODMAN_SYSTEMD_UNIT=podman-${name}.service";
Type="notify";
NotifyAccess="all";
};
};