The transport secretary is to unveil the first two railway lines to receive funding to restore rural services.