{ config, lib, namespace, ... }: let name = "cockpit"; cfg = config.${namespace}.services.${name}; cockpitConfig = lib.${namespace}.mkModule { inherit config name; description = "Cockpit web-based server management UI"; moduleConfig = { services.cockpit = { enable = true; port = cfg.port; openFirewall = cfg.openFirewall; }; }; }; in { imports = [ cockpitConfig ]; }