{ lib, config, ... }:
with lib;
{
options = {
protocols.rstp = mkOption { type = types.listOf types.str; };
netconf.xmls.protocols = mkOption {
type = types.str;
visible = false;
readOnly = true;
};
};
config.netconf.xmls.protocols =
let
rstps = map (intf: "${intf}") config.protocols.rstp;
in
''
${concatStringsSep "" rstps}
'';
}