{ config, lib, ... }: let cfg = config.services.piped; in { config = lib.mkIf (cfg.enable && !cfg.disableNginx) { services.nginx.enable = true; }; }