docker-stack: fix mkIf function

This commit is contained in:
Dmitriy Pleshevskiy 2023-03-15 22:51:19 +03:00
parent b870a54f1f
commit 22bb8f50f5
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985

View file

@ -232,7 +232,7 @@ in
description = lib.mdDoc "Docker stacks to deploy using systemd services."; description = lib.mdDoc "Docker stacks to deploy using systemd services.";
}; };
config = lib.mkIfattrNames (cfg.stacks != { }) { config = lib.mkIf (cfg.stacks != { }) {
systemd.timers = lib.mapAttrs' (n: v: lib.nameValuePair "docker-stack-${n}" (mkStackTimer n)) cfg.stacks; systemd.timers = lib.mapAttrs' (n: v: lib.nameValuePair "docker-stack-${n}" (mkStackTimer n)) cfg.stacks;
systemd.services = lib.mapAttrs' (n: v: lib.nameValuePair "docker-stack-${n}" (mkStackService n v)) cfg.stacks; systemd.services = lib.mapAttrs' (n: v: lib.nameValuePair "docker-stack-${n}" (mkStackService n v)) cfg.stacks;