From 76e1e908c1cbcf54b5a328af6e62a483f0637a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 17 Oct 2022 16:11:56 +0200 Subject: [PATCH] nixos/modules/virtualisation: fix oci-containers with docker The empty attribute set is invalidly provided as service config and results in evaluation error. --- nixos/modules/virtualisation/oci-containers.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/virtualisation/oci-containers.nix b/nixos/modules/virtualisation/oci-containers.nix index 36a28efc6ce4..61066c3cbd75 100644 --- a/nixos/modules/virtualisation/oci-containers.nix +++ b/nixos/modules/virtualisation/oci-containers.nix @@ -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"; }; };