nixos/k3s: Use optional for more idiomatic code

This commit is contained in:
ThinkChaos 2020-11-20 00:26:03 +01:00
parent acb845dd11
commit 4db9d279c4

View File

@ -78,7 +78,7 @@ in
systemd.services.k3s = {
description = "k3s service";
after = [ "network-online.service" "firewall.service" ] ++ (if cfg.docker then [ "docker.service" ] else []);
after = [ "network-online.service" "firewall.service" ] ++ (optional cfg.docker "docker.service");
wants = [ "network-online.service" "firewall.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {